1

Im trying to find a way to run two codes from the one arduino me being an absolute begginer doesnt even know where to start the DHT11 thermometer is connected to a LCD showing temperature and humidity and uses a "DHTlib" library whereas the joystick controlling 2 servos has no library. I have two seperate working codes but putting them together and getting them to work is a big problem.

The concept is to control a space rover for my school project there will be a camera attathced to the servos so it can move along 2 axes and the thermometer is to prove the rover can gather imformation.

  • Welcome, I proposed to close it because it's probably helpful to read the duplicated question (which is more generic). In case you have further question, you need to be more specific. Also I suggest you first try out the components one by one before trying to combine them, especially if you are a beginner. – Michel Keijzers Nov 05 '20 at 17:09
  • you are thinking about this incorrectly ... there is no `DHT11 connected to LCD` ... there is no `servos connected to joystick` ... these are separate actions ... `read temperature from DHT11` and `read joystick value` and `display data on LCD` and `move servo` .... try to write a sketch that does each of these separately ... read temperature an send the value to serial monitor ... same with joystick ... display "hello world" on LCD ... move servo1 to 90 degrees ... move servo2 to 170 degrees ..... when that all works, then add code to use the temperature value as input to LCD code .. etc. – jsotola Nov 06 '20 at 00:54

0 Answers0