I am currently Building a Humanoid Robot using the Arduino Nano v3
I have like 16 sensors integrated in the robot is it possible for me to type code for each one of those sensors individually and then combine it in one large code.
Are you hinting that you have NOT tested each one? The usually way to program is to do one sensor and test it and be sure it works. Then add to that program for a second sensor and test both, then the third, then the fourth, etc. Testing the whole, partial program each time. Otherwise you end up with an really difficult mess.
oh no like, When i receive all my parts and sensors, for my robot i was thinking of Coding on Arduino IDE For each individual Sensor, Like i Code my Temperature Sensor to do something then i export the code and code the next sensor.
Once i have coded all the sensors can i like Put it all in one single code, Just to make it simpler
You don't need to export anything, just attach (wire) and code your sensors one-by-one and expand your sketch as you move to the next sensor.
Yes.
if the sensors are similar, wouldn't the same sub-function be used with different parameters. hopefully not cut&paste the same code
sounds like a bigger project. make sense to start with code that exercises and tests each feature, this not only means reading sensors and controlling actuators but incorporating debug prints that show how sensor values are used to determine actuator paramters
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.