Solving slow baud rate error on pi with piicodev button

I am using a piicodev button on my horse training robot project as a a backup when things aren’t going to plan to trigger the piezo buzzer and the servo motor. But although the code I am using works, the button response seems to be quite random -sometimes it triggers the components when pressed and other times not and then after a long delay, it seems to trigger them randomly. I keep getting a 'slow baud rate" error and although I’ve implemented the fix suggested in the Thonny shell, it keeps happening. I also get an “address not found at 66 error”.

I have four piicodev components connected to a piicodev adapter on the pi- the button, the buzzer, a servo relay and a capactive touch sensor. All connected with the piicodev cables.

Would appreciate any advice re solving these errors and also advice on whether I can increase the volume of the buzzer, and if not, what would be an alternative solution that I can use with the pi to deliver precise tones at an adjustable volume. If I need to use something other than a piicodev product for increasing the sound, advice on how to add it to the set-up I have with the piicodev adapter would really be appreciated.

Thanks as ever in advance.

1 Like

Hi @Cath250795, I’m sorry to hear you’re having trouble with your PiicoDev hardware.

Baudrate issue

I’m surprised you’re getting the 'slow baud` error after executing the fix. To clarify, you have already

  • run the command as follows (note, this only works if you’re connected to the internet), and;
  • tried restarting your Pi

The command is as follows

sudo curl -L https://piico.dev/i2csetup | bash

Once we’re sure of that, it’ll be really helpful if you could provide a few things:

  • Some pictures of your setup and the connected hardware.
  • a copy of your project code (or a simplified test code if the project is quite large)
  • run sudo cat /boot/config.txt and paste the output here.
  • Have you split-test the system eg. test the behaviour of the button connected to the Pi just by itself to observe its behaviour? The example code from the tutorial might be useful here.

Volume issue

If your buzzer looks like this then it’s as loud as we can make it for now. This is the latest ( and loudest) version in the PiicoDev lineup.

If you’d prefer to connect your own buzzer directly to your Pi I’m sure there are many resources to get started.

Keep us updated and I hope we’ll get to the bottom of this quickly :slight_smile:

1 Like

Thanks Michael.

So I reran the baud rate fix as per your instructions and this time it worked so must have not implemented it correctly last time. That has resolved the address error too and also the randomness of it’s operation. I am finding I need to be quite precise with pressing it- if it’s not quite hard enough it doesn’t respond. So think I need to develop a more permanent mounting solution.

I currently have it attached to the pi via a 600m cable- wondering if it would work with something even a bit longer to give me more leeway to be further away from the actual device to which the pi is attached and the horse is interacting with. I will check out the options for a louder buzzer. The horses can hear the one I have now because they have very sensitive hearing but when it is windy they struggle, so something with more volume would be good. Thanks as ever for your help.

2 Likes

Hi Cath,

Unfortunately 500mm is already really pushing it for I2C (the protocol that PiicoDev uses to communicate), so we don’t offer anything longer.

I understand that this might introduce added complexity, but we put a lot of effort into making the PiicoDev wireless transceiver as painless as possible to use. Give the guide a squiz to see if you’re up to it, or if it could help you out:

1 Like

Hi James.

Thanks for the added info. I did watch the getting started guide so it appears I need two piicodev transceivers to send and receive. I would appreciate your recommendation for something to trigger the signal- would the piicodev button I already have work? Apologies if it’s obvious! The functionality I am looking for is to be able to press something to trigger a tone, then the tigger another tone, then trigger the servo motor within the same code so it happens in a sequence. I also need to log the time this happens which I know I can code. We need this functionality as a backup in case the horses damage the touch sensor and it stops working. By using the backup, if they make the response we want, we can still log it and reward them with the feed, even if the sensor doesn’t trigger. A colleague suggested using an RF remote key fob with a receiver on the pi, but have not had much luck finding suitable parts for that-probably because I am not looking in the right places.

If I add the piicodev transceiver to the set-up-pic below, can it be added to the piicodev adapter or do I need something else? Can the transceivers run off the existing pi or would I be better adding a pi piico to the mix? If yes, could specify all the parts I would need so I don’t need to guess-including what to mount it on to keep it stable so I make sure I don’t miss anything for when I place an order. We’re coming close to starting the experiment so want to be sure we have everything we need to make it work!

Thanks again!

1 Like

Hi @Cath250795 - I was chatting with you today about the parts you might need for this project. I didn’t make the connection at the time! Do keep us informed about your project. We’re here to help however we’re able.

Also, at completion - consider writing it up and sharing your project. We’d love to publish projects like this one and I’m sure the maker community would be really interested in what you’re doing with maker tech :smiley: (there’s also a store credit incentive, to help offset the cost of your next project :wink: )

2 Likes

Hi Michael. Will do! The piicodev products combined with the excellent tutorials have been great and have facilitated a complete novice like me with no background in this field to get my “robot” prototype working. With a few more refinements it will be put to the test with 20 hungry horses next month!

2 Likes