Go Down

Topic: code (Read 149 times) previous topic - next topic

Semi98

// variables that can be changed
const int S = 98; //distance between center of left and right sensors in millimeters
const int resultDelay = 5000; // time display of measurement results in milliseconds
const int animationDelay = 50; // direction ticker delay time in milliseconds
const unsigned long timeoutDelay = 160000; // the waiting time of the second sensor signal in milliseconds
const int decimals = 2; // the accuracy of the result display

// arrays, which can added or changed
const String scale[][2] = {{" HO", "87"}, {" TT", "120"}, {"  N", "160"}}; // array of scales (display on-screen, the multiplier)
const String units[][2] = {{"KPH", "3.6"}, {"MPH", "2.23694"}}; // units array (display on-screen, conversion factor from meter per second)

// Creates a Bounce object, which you will later assign to an input pin.
Bounce scaleBouncer = Bounce();
Bounce unitsBouncer = Bounce();

LiquidCrystal lcd(2, 3, 4, 5, 6, 7); // (RS, E, DB4, DB5, DB6, DB7) initialize the library with the numbers

PLEASE CAN YOU TELL ME WHAT THIS MEANS IN TO THE CODE.
IT MAKES THE UPLOADING STOP

Bounce scaleBouncer = Bounce();
Bounce unitsBouncer = Bounce();

THIS IS ONLY THE FRONT PART OF THE CODE

CODE WILL NOT LOAD ONTO A ARDUINO, CAN SOMEONE HELP PLEASE.

KIND REGARDS

slipstick

When you try to verify the code you get error messages with lots of useful information. Post the complete message here. And post the complete code.

I guess the error might indicate that you are missing a #include for whatever does the Bounce, possibly Bounce2.h. But I can't see the error so it might say something else and for all I know the #include might be in the part of the code you didn't post.

Steve

Go Up