![]() ![]() I am not sure which analog pin (A0, A1, A2…etc) should I use or does it not matter?.Please see attached code for what I have so far. ![]() That being said, I am a beginner at this and I am really just taking part of codes developed by other people online and modifying it. I believe that I need to use interrupts to manually make analog to digital conversions at the same time as I control the servo. I have used analogRead() in a for loop after every degree of rotation but it slowed down my servo and I didn’t get the sampling rate that I need…so analogRead() isn’t sufficient for me. This means that I need continuous analog reading, hopefully multiple current readings (samples) per degree of rotation. I am implementing this by controlling the servo, while reading the current values using a current sensor (1 amp per 1 volt), and reading it in one of the analog pins (i.e. I want to make a feedback where if the servo’s current increase, I would be able control the servo in a different direction or so. So I have a project where I am using an Arduino Uno to control a servo.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |