Smartibot #7291
Replies: 1 comment
-
Posted at 2019-03-18 by @gfwilliams Hi, Yes, it's the right place! There's no dedicated capacitive sense hardware on the board itself. Basically:
This is the same way that Puck.js does it too. Puck.js uses a software polling approach which hasn't (yet) been added to Smartibot, so for now if you actually want capacitive touch you're on your own (JS execution speed likely isn't fast enough to do anything usefully). However you could actually configure the underlying hardware to do this for you using http://www.espruino.com/NRF52LL - set up a timer to send a square wave on D25, and then when D5/D31 change you trigger a 'capture' event. If you did something like that it'd be great if you could post it up, as it might be an interesting thing for other boards too. Posted at 2019-03-18 by Bennr Thanks for the info. I'm messing about using the examples, but I don't really know what I'm doing to be honest. I keep Is the code that does this on the Puck available somewhere for me to look at to try and understand it, or will that not really help? Posted at 2019-03-19 by Robin Mon 2019.03.18 Does this summation provide some insight? Under heading at page end: Capacitive Touch Sensor Would need to be adapted from STM32 to nRF52 pin designations Posted at 2019-03-19 by @gfwilliams The Puck's capsense code is here: https://github.com/espruino/Espruino/blob/master/targets/nrf5x/nrf5x_utils.c#L61 But I actually don't use the hardware variant - I use the simple software one below it. Just FYI -if you want to see how something is done, look in http://www.espruino.com/Reference and after the title of a function there's a Here's some code you can use. I'll update the NRF52LL page:
Posted at 2019-03-19 by Bennr Thanks for the info @robin I'll have a look at that to try and further my understanding. Thanks for the code @gfwilliams and for the tip about finding the underlying code. I find it fun to dig about and try and understand these things, even if it usually comes to nothing! There is a lot of information about the chip here http://infocenter.nordicsemi.com/pdf/nRF52832_PS_v1.1.pdf which looks pretty exciting, so I'm going to mess about with it using the js interface and see what happens. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2019-03-18 by Bennr
Hi, not sure if this is the right place to post about this board. I have got one and think it's great and am looking forward to exploring it more.
I'm trying to figure out how to access the capacitive touch sensors but can't figure it out. I have looked at the
boards/smartibot.py
file and can't see anything mentioning about capacitive sensors like in thepuck.js
file. I am keen to explore the board and somehow figure this sort of stuff out but can't really get my head around it!Any guidance would be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions