We've been able to follow the tutorials to get a simple BT app working and connecting our arduino to an App Inventor app.
However, when we try to write code to control a servo, it'll work (move the servo) once, then we get a "broken pipe" error on the App Inventor app.
The best we can figure is that the servo might be drawing too much power and it is resetting the bluetooth module? We've tried powering it with a laptop usb port (we can read the serial input/output this way) and with the battery pack we were sent. We even tried using a larger battery pack with no success.
Will the servo need to have its own power source? Any other suggestions?
First thoughts: Drawing too much power is possible, but it could be something else. These types of servos can draw up to 750mA (typically less but we haven't measured). The HC-05 Bluetooth only draws around 40mA. The power supply on the Arduino Nano Every, the MPM3610, should be able to supply up to 1.2A on the 5v pin ( https://www.monolithicpower.com/en/documentview/productdocument/index/version/2/document_type/Datasheet/lang/en/sku/MPM3610GQV-Z/document_id/2090). So, you should be within the Nano Every's limits.
Have you tried a smaller angular movement with the servo to see if that works?
Note that if you're using an Arduino Uno or the original Nano, you're much more likely to draw too much power.
We were concerned about this possibility, though, with all the sensors we've given you. Our plan is to show -- with one of our tutorials -- how to create a separate 5v power rail with the USB battery to power the servo separately.
We had been using a Nano. We have a few different students working on different parts of the puzzle, so we were using Nanos we have on hand to build circuits & test code.
I tried replacing the Nano with the Every and am having the same problem, though. It's still throwing a "Broken Pipe" error after the servo moves once.
following up from last night, our coder was able he servo to work over bluetooth when the nano was plugged into the computer via USB.
We are also having some trouble with this but it has been erratic.
We had the BT and the servo working great for a while but after several days of work we could only run the BT when the servo was unplugged.
We were about to bring in 5v from an outside power supply but now the BT doesn't seem to work at all anymore. (We'll be making a post about the BT module elsewhere)