Restart sketch Teensy 3.6

Status
Not open for further replies.
Hi,
I am working on data logging using T_3.6, powered by external batteries.
The code will flow into loop of LED blinking once finished. (Code is inspired from tni's logger. Shout-out to tni ! xx)

If let say I want to restart the sketch after I finished one measurement. From my observation, unpowering Teensy after finish, and then power it back will restart the sketch.
Just to confirm if this method is really reliable (or any flaw?), or if there is any more elegant way.

Many thanks !
xx

p/s: I tried with holding 15 secs button, but it restarted to blank sketch when powered by battery. Let me know if I am wrong :)
 
Silly me ! Thank you Michael for the correction. Grounding it via Teensy itself should work isnt it ?

I would worry about the state of the pin while the chip is booting, before it gets to setup, but it shouldn't be hard to try.

Here is a solution for the Teensy 3.2 to use a spare pin as a reset. It works on a 3.5. I don't have a 3.6 nearby. It seems to turn off the Teensy 4.0, but I have to power cycle it to get the Teensy running again:
 
I would worry about the state of the pin while the chip is booting, before it gets to setup, but it shouldn't be hard to try.

Here is a solution for the Teensy 3.2 to use a spare pin as a reset. It works on a 3.5. I don't have a 3.6 nearby. It seems to turn off the Teensy 4.0, but I have to power cycle it to get the Teensy running again:

Tested it on 3.6 , works like a charm !

Cheers everyone xx
 
Hi,
I am working on data logging using T_3.6, powered by external batteries.
The code will flow into loop of LED blinking once finished. (Code is inspired from tni's logger. Shout-out to tni ! xx)

If let say I want to restart the sketch after I finished one measurement. From my observation, unpowering Teensy after finish, and then power it back will restart the sketch.
Just to confirm if this method is really reliable (or any flaw?), or if there is any more elegant way.

Many thanks !
xx

p/s: I tried with holding 15 secs button, but it restarted to blank sketch when powered by battery. Let me know if I am wrong :)

you can also use the RTC to restart after so many seconds (i.e. fixed duty cycle)
if interested search forum for microSoundRecorder
 
Status
Not open for further replies.
Back
Top