My set-up was working perfectly on my desk all day today, but when I took it outside and made one change to it- connected it to a larger touch sensor connected to a piicodev capacitive device, I got these errors detailed below.
This is the first time I’ve got these errors. In the past when have had issues with the temporary connection to the larger touch sensor it just didn’t read any touches but the script still executed without the errors and when I fixed the connection, the sensor would register the touches.
Last week I added a DAC Pro HAT, to the Pi so I could get louder tones, and the set-up worked on my desk no problems. Since then I have been having connection problems with it outside. Last time (Monday) it was connection problems with the piicodev buzzer even though nothing had changed with the physical buzzer connection between testing on my desk and testing outside (ie, buzzer cabling etc left in situ). I then coded in the WAV tones to sound via speakers which worked a treat when on my desk. Took it all outside with all the peripherals -piicodev server driver, servo motor, keyboard, mouse, DAC Pro HAT and speakers left in situ. Only thing that changed was connecting to larger sensor so wondering if the issue is the connection to the larger touch sensor? Am waiting on final component to solder it all together to make connection more sturdy- is this likely to solve it?
Attaching a photo of the set-up and the errors below. Any advice greatly appreciated.
Error codes with filename deleted, otherwise copied as is
In the photo, the green gaffa taped thing is the feed dispenser with the servo inside, gaffa for temporary attachment until I know it will keep working. Touch sensor attachment in box above main set-up is also temporary until header pins arrive-hopefully soon.
Glad to hear you are getting close with your ongoing project! Just so you know, if you reply to your own thread, it bumps it to the top of the forum again, and keeps things a bit cleaner (a thread for a project).
But that’s just icing, let’s pick apart those error messages! Luckily they seem quite descriptive, basically telling you that it’s having trouble talking to the servo driver. There are a couple of things that come to mind:
- How are you powering that servo driver? Is it the same supply that’s powering the Pi? If not, I’ve heard switchmode supplies can enhance each other’s noise and cause problems, so you might want to try powering the driver from a Pi USB port short term to rule that out.
- You may want to remove the green tape over the touch sensor, I’m not sure whether the contact there will be enough to influence capacitance readings between the 1, 2, and 3 pins.
Give those a go and see if either do anything.
Thanks James. It was indeed the dodgy connection on the sensor (green gaffa) that was the source of the grief. Now all the parts to solder a solid connection have arrived this won’t happen again. So that should be all the basic sorted.
But one thing I still haven’t solved is gaining some kind of remote control over the whole set-up. Ideally I would like something with the functionality of a remote control car controller that would allow me to execute the python script from some kind of wireless hand held device, and then manually trigger events like the tones sounding or operating the servo in case we get an issue with say, a horse damaging the touch sensor.
I did manage to get my two piicodev transceivers communicating via a pico and the pi using the excellent guide produced on the website, but its a bit clunky to hold in my hand and the pico is still attached to the pi-can I pair the pico and the pi so the pico can command the pi wirelessly-via bluetooth?
I did wonder if the pimoroni display unit with buttons that plugs into the back of the pico could be an option and use bluetooth rather than radio waves to communicate between pico and pi to trigger the events, but then how do I power this so they can be hand held-ideally via the lipo battery I have?
Realise this remote step might be too complicated for my level of electronics knowledge and python programming. What I have really appreciated the plug and play capability of the piicodev modules so don’t want to move away from them at this stage.
So this is the kit I have:
Pi with DAC pro HAT
Piicodev adapter with two ports used- touch sensor and servo driver
For the wireless “remote”
Pico lipo adapter
2 x piicodev transceiver modules
Thanks as ever in advance for your help.