Could you try - once you're connected via Bluetooth - typing load() on the left-hand side? This will have more or less the same effect as a power-on reset, so you should be able to see if there are any errors or anything written to the console. Failing that, you could try blinking LEDs to give you some idea of the status of your code.
Had a green light, then switch to the red light each time.
And it just stays on red? It should go:
Green (3 sec)
Brighter green (0.5 sec)
All LEDs on
1 sec
Red flashing 5 times
Is it possible that you downloaded and flashed the wrong firmware package? Like the Pixl rather than Puck, or something like that? Maybe you could try re-downloading, especially as there is a 2v01 firmware now.
As for the PIR and Microwave sensors, I've tried common ground initially
It's possible that some sensors only provide a pullup(or pull down) on a signal and are open circuit the rest of the time. In that case you'd need to turn on the Puck's internal pullup resistors with pinMode(pin, "input_pullup") (or input_pulldown).
The other potential issue is if you're using (for instance) a 5v circuit for the sensor then it might be outputting 5v signals directly into the Puck, which would cause all kinds of havoc (it's only designed for 3.3v level signals).
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hmm - it's a bit tricky to debug stuff like this.
Could you try - once you're connected via Bluetooth - typing
load()
on the left-hand side? This will have more or less the same effect as a power-on reset, so you should be able to see if there are any errors or anything written to the console. Failing that, you could try blinking LEDs to give you some idea of the status of your code.And it just stays on red? It should go:
Is it possible that you downloaded and flashed the wrong firmware package? Like the Pixl rather than Puck, or something like that? Maybe you could try re-downloading, especially as there is a 2v01 firmware now.
Could you post up a quick sketch of your circuit?
You could try uploading just:
And see what happens?
It's possible that some sensors only provide a pullup(or pull down) on a signal and are open circuit the rest of the time. In that case you'd need to turn on the Puck's internal pullup resistors with
pinMode(pin, "input_pullup")
(orinput_pulldown
).The other potential issue is if you're using (for instance) a 5v circuit for the sensor then it might be outputting 5v signals directly into the Puck, which would cause all kinds of havoc (it's only designed for 3.3v level signals).