Making a children's toy for a NEA

Currently I'm trying to program an Arduino to act as a children's toy which will detect noise from the child and will react accordingly. Here are the components I've got so far:

  • 3 Servos (one in each ear and one for both eyes so they can open and close)
  • Mic
  • LED
  • 2 PTM (one in each hand)
  • Battery (LiPo)

I know this sounds a little complex for a first timer but I have the motivation.
Here are all of the problems I've ran into so far:

  • : problem
  • : solution
  • connecting all the components at the same time
  • make your own circuit board (would take a lot of soldering)
  • use a bread board (might take up too much space inside the toy)
  • coding everything in the same file (I can learn how to code each component separately)

  • making the toy durable for children (chewing, pulling, etc.)

  • create a silicone later between the components and the fabric
  • when I programmed the servo it wouldn't stop turning :sweat_smile:
  • It's a coding mistake and I'd appreciate any help I can get with the coding since I only have a very minor background in coding (Python, ruby, C++, HTML)

It sounds like you have not got servos which you can control the angles of but continuous rotation "servos" which you can only control the speed and direction of. How do they behave if you run the Servo Sweep example ?

By all means use a breadboard for testing but not in the real thing as the connections will be unreliable and will fall out

The Arduino is programmed in C++ with extensions relevant to controlling the hardware

1 Like

When I run the Servo Sweep example it turns 90 degrees then goes the other way 90 degrees. I might just have to get a better quality servo. Also, do you know a servo that would work well with this project? I wouldn't want to buy something that won't work properly or even worse the same as the one I've got now.

and thanks for the tips and advice, it helps :slight_smile:

That's exactly what the Sweep example is meant to do with a real servo. The clue is in the name. If it had behaved differently then it would have meant that you did not have a real servo

What did you mean when you said earlier that the servo would not stop ?

Please post your full sketch that cause the problem and use code tags when you do

That's a bit embarassing :sweat_smile:
I meant that for as long as the servo was connected it kept doing the same command on repeat and just wouldn't stop unless I removed one of the wires.
honestly if I knew how to code it properly it would've worked, I know what I've done wrong but its just figuring out how to do it correctly to give me the outcome I want.

If you know anything that I can read to learn more about coding even just that would help a lot

and there's no need to post the full sketch since I know the mistake I just don't know how to change it and it still work with no errors

Please post the whole sketch otherwise it is going to be difficult to provide any help. From experience here when users post parts of a sketch it often turns out that the problem is in the part that they did not post, so why take a chance. Post it all

I don't know how to format the code to make it readable.

Tom... :smiley: :+1: :coffee: :australia:

When you joined the forum about 10 days ago you were directed to read the advice on how to get the best out of the forum which includes the use of code tags

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.