Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 4929

My Arduino Loop (Arduino Uno) Not Looping

$
0
0
I am reading three analog channels in, A0, A1 and A2. I am taking each input ten samples of each input, getting a sum and dividing by 10 for an average. All of that seems to work just fine. Here is my current code:
Code (Text):
  1. //Libraries
  2. #include <Wire.h>
  3. #include <LiquidCrystal_I2C.h>
  4. LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);  // Set the LCD I2C address.
  5. // number of analog samples to take per reading
  6. #define NUM_SAMPLES 10
  7.  
  8. int sum1 = 0; // sum of samples taken
  9. int sum2 =...
My Arduino Loop (Arduino Uno) Not Looping

Viewing all articles
Browse latest Browse all 4929

Trending Articles