i was hoping to be able to use Espruino to query some external sensors on Thingy:52
The basic idea is to connect an external analogue sensor, say soil moisture, to Thingy and let Thingy broadcast the sensor readings.
Very much like a combination of what is done with the Pico here to connect an external light sensor: https://www.espruino.com/Pico+Light+Sensor and the Thingy here to let it broadcast sensor values: https://www.espruino.com/Pixl.js+Wireless+Weather+Station
The Espruino-Thingy page at https://www.espruino.com/Thingy52#on-board-peripherals
seems to suggest this is possible (Section "On BOard Peripherals") via
// External IO outputs
However, I can find no further documentation/ tutorials on how to actually read the sensor values.
Any pointers to further information would be very much appreciated!
So in terms of IO you have:
On the rear of the thingy D2/D3/D4 are labelled as P0.02/etc.
So basically all you need is to use D2 3 or 4 exactly like you would on the Pico (analogRead(D2)) and you're sorted.
Thanks for the swift reply, Gordon!
Very cool, I didn't realise you could do this without using anything Thingy-specific!
Just flashed one of my Thingies with Espruino. Exciting!
...fortunately... or unfortunately... it all depends... first for you, latter 'not-for'-for @Gordon... but it speaks for what @Gordon does: powerful solutions easy to apply!
So fare I stayed with having Espruino only on Espruino boards and could abstain from putting Espruino onto something else but Espruino board... but with my most recent tinkering - Espruino on the mini 10 x 10 [mm] ESP-09 - if feel like a traitor... :/
The fact that I was unable to update my aged ESP-09 with new AT version from espressif... but it was a breeze to get Espruino onto it and it worked right of the bat (after properly connecting CP_PD), speaks even more for the quality and ease of use what comes out of @Gordon's 'Schmiede'.
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem