Git Product home page Git Product logo

Comments (4)

billroy avatar billroy commented on August 10, 2024

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.

SadE54 avatar SadE54 commented on August 10, 2024

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.

billroy avatar billroy commented on August 10, 2024

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.

billroy avatar billroy commented on August 10, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.