Comments (4)
Unfortunately, functions cannot be saved through a reboot on the Due because the Due has no EEPROM. This is why your example fails when you say "boot". If you said "startup" instead, it should work.
-br
from bitlash.
I can manually toggle the pin13 with d13=0 or d13=1
but I can only set (no reset) d13 with d13=!d13.
It explains why the toggle13 is blocked with led on.
Concerning the EEprom probleme, I saw a library for writing flash of Arduino Due. Maybe a start of solution ? :)
from bitlash.
Apologies for the delay. I tested this on a Due and it works:
> function toggle13 {d13=!d13;}
saved
> ls
function toggle13 {d13=!d13;};
> run toggle13,1000
> ps
0: toggle13
> stop 0
> ps
>
I will look into the library you mentioned as it sounds very interesting. If you get to it before me, I do welcome pull requests. Please reopen this and provide details if you can reproduce the problem.
Thanks,
-br
from bitlash.
Apologies, on further examination there is a bug there, and thank you very much for bringing it to my attention.
It appears to be a backward compatibility bug in the Arduino core: on the Due, digitalRead always returns 0 on output pins. It is easy to reproduce with a simple sketch. For now, it's a Bitlash limitation on the Due.
I've opened a bug against the Arduino core here: arduino/Arduino#1597 -- perhaps an alternative to waiting for that fix would be to kludge around the problem by patching Bitlash to track and return the state of the output pins in digitalRead, only on the Due.
Will leave this open pending resolution of the core issue.
from bitlash.
Related Issues (20)
- Talk to arduino without >command HOT 6
- run bitlash code stored in flash HOT 5
- eeprom overflow error with bitlash run command for a user defined function HOT 3
- Blank user function causes following functions not to appear HOT 2
- Port to spark-core or esp-8266 HOT 7
- Not working on new Arduino.. HOT 9
- Can't save user functions to startup? HOT 27
- Deleted-cant add user functions to memory
- Cant add more then 9 commands inside startup functions
- No support for bypass serial
- Serial flash support? HOT 2
- No need to wait after Wire.requestFrom().
- LED was very dim when using bitlash HOT 1
- bitlash demo - blink does not blink HOT 5
- Problem of output buffer when using bitlash
- ========^ unexpected number error for functions HOT 5
- Run code from eeprom HOT 2
- Make SdCard example code use IDE's inbuilt SD API
- Maintained fork?
- update library for support lastet arduino ide version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bitlash.