I have problem with results (on serial monitor) of rotary encoder. I am using Arduino UNO and RotaryEncoder library. When I am running example code serial monitor show proper values when rotating with any speed. I want to use encoder to change volume in Df-player. Problem starts when I want to use this code together ..
Category : arduino-uno
I have been trying to write some code for a project where I move a servo based off of the resistance for a soft pot. I am writing it in C++ on an arduino board, and want my servo to move a certain amount for each range of resistance values. Here is my code: #include ..
Just a quick question for my design class. I am trying to interface with the Serial monitor to translate a char into morse code. To do this, a few if else statements were used in the first part of my loop. Along with the index for the alphabet, there are certain special chars within if/else ..
Hello guys can anyone please help me out with this code i want to perform this code in a loop. So that it repeated itself n no of times #include <Servo.h> Servo myservo; #define pushButtonPin 2 int pos =0; int buttonPushed =0; void setup() { myservo.attach(9); pinMode (2,INPUT); pinMode (pushButtonPin,INPUT_PULLUP); } void loop() { myservo.write(pos); ..
I have a lot of variables (3×12) that I have set up under a structure: struct Tracking { String Title; BoolArray n24hr; bool State; unsigned char Days, Weeks; uint16_t Minutes, TotalMinutes, Daily, Weekly, Monthly, n7d[7], n4w[4]; } Components[3]; I also have code that performs basically the same thing 3 times but on different "levels", e.g. ..
This is my code, I am trying to code it so I can run a DHT sensor, while turning 2 LEDs on for 60 seconds, then turning those LEDs off and turning two others on for 120 seconds. With this code, the sensor works and the first two LEDs turn on, but they do not ..
I need to make this object following robot which uses 2 servo motors to move and a ultrasonic sensor to detect where objects are and where the Arduino should tell the servos to move. But, the problem seems to be that whenever the servo motors are trying to move forwards or backwards they just keep ..
I’m not a new to programming world, but for last 2 weeks I’m work with Arduino C. I have a strange problem. In general, I’ve a 7-segment display that will act as up counter when the condition is 01, down counter when the condition is 10, 00 for reset to zero, and 11 for stop ..
This is the part of the code with the error: int value = analogRead(LM351); float Temperature = value * 500.0 / 1023.0; lcd.setCursor(6,0); lcd.print(Temperature); lcd.setCursor(11,1); int value1 = analogRead(LM352); float Humidity = value1 * 500.0 / 1023.0; lcd.setCursor(10,1); lcd.print(Humidity); if (Temperature > 24){ digitalWrite(motor, HIGH); digitalWrite(LedRed, HIGH); digitalWrite(LedGreen, LOW); lcd.print(""); } else { digitalWrite(motor, LOW); ..
Put the Code in you Arduino ide, connect a lcd display to your Arduino and upload the code to you Arduino. This is just a basic concept, but i hope this will work XD Have fun! more Detail, more Detail, more Detail, more Detail, more Detail, more Detail, more Detail, more Detail, more Detail, more ..
Recent Comments