- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I followed Rex's Grove Starter kit and then decided to add a little bit more complexity to it to do more interesting things. I have the rotary sensor controlling the servo. The code itself works great for a while until it eventually crashes. Full symptoms are: Program stops responding to analog input, followed by the wifi appearing to shut down temporarily.
I have attempted increasing the detection to every .25 seconds, which made the issue worse. Decreasing the time to .05 seconds seems to work better-ish. I use cylon.js.
every((.05).second(), function() { var nAngle = parseInt(robo.rotary.analogRead() / 5.6); var aDelta = nAngle - robo.servo.currentAngle(); if(aDelta > 7 || aDelta < -7 && nAngle > 5 && nAngle < 175) { robo.servo.angle(nAngle); } });
I have the analog connected to A0 and the servo connected to D3. I currently have nothing else connected. The switch is set to 5V. It seems to die immediately on 3v3.
Any ideas what the issue might be? Do I need more power?
- Tags:
- Internet of Things
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Measure the voltage rails, its likely the Servo is needing more power than the 5V regulator can supply, especially if it stalls.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page