I am getting the following error:
Arduino: 1.8.13 (Windows 10), Board: "Arduino Uno"
C:\Users\Dhruvil\OneDrive\Documents\Arduino\sketch_jun26d\sketch_jun26d.ino: In function 'void loop()':
sketch_jun26d:66:46: error: no matching function for call to 'print(const char [19], int)'
lcd.print("Body Motor Speed: ", (val2 - 90)); // write this string on the top row
^
In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Stream.h:26:0,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/HardwareSerial.h:29,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:233,
from sketch\sketch_jun26d.ino.cpp:1:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:69:12: note: candidate: size_t Print::print(unsigned char, int) <near match>
size_t print(unsigned char, int = DEC);
^~~~~
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:69:12: note: conversion of argument 1 would be ill-formed:
C:\Users\Dhruvil\OneDrive\Documents\Arduino\sketch_jun26d\sketch_jun26d.ino:66:46: warning: invalid conversion from 'const char*' to 'unsigned char' [-fpermissive]
lcd.print("Body Motor Speed: ", (val2 - 90)); // write this string on the top row
^
In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Stream.h:26:0,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/HardwareSerial.h:29,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:233,
from sketch\sketch_jun26d.ino.cpp:1:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:70:12: note: candidate: size_t Print::print(int, int) <near match>
size_t print(int, int = DEC);
^~~~~
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:70:12: note: conversion of argument 1 would be ill-formed:
C:\Users\Dhruvil\OneDrive\Documents\Arduino\sketch_jun26d\sketch_jun26d.ino:66:46: warning: invalid conversion from 'const char*' to 'int' [-fpermissive]
lcd.print("Body Motor Speed: ", (val2 - 90)); // write this string on the top row
^
In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Stream.h:26:0,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/HardwareSerial.h:29,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:233,
from sketch\sketch_jun26d.ino.cpp:1:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:71:12: note: candidate: size_t Print::print(unsigned int, int) <near match>
size_t print(unsigned int, int = DEC);
^~~~~
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:71:12: note: conversion of argument 1 would be ill-formed:
C:\Users\Dhruvil\OneDrive\Documents\Arduino\sketch_jun26d\sketch_jun26d.ino:66:46: warning: invalid conversion from 'const char*' to 'unsigned int' [-fpermissive]
lcd.print("Body Motor Speed: ", (val2 - 90)); // write this string on the top row
^
In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Stream.h:26:0,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/HardwareSerial.h:29,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:233,
from sketch\sketch_jun26d.ino.cpp:1:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:72:12: note: candidate: size_t Print::print(long int, int) <near match>
size_t print(long, int = DEC);
^~~~~
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:72:12: note: conversion of argument 1 would be ill-formed:
C:\Users\Dhruvil\OneDrive\Documents\Arduino\sketch_jun26d\sketch_jun26d.ino:66:46: warning: invalid conversion from 'const char*' to 'long int' [-fpermissive]
lcd.print("Body Motor Speed: ", (val2 - 90)); // write this string on the top row
^
In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Stream.h:26:0,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/HardwareSerial.h:29,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:233,
from sketch\sketch_jun26d.ino.cpp:1:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:73:12: note: candidate: size_t Print::print(long unsigned int, int) <near match>
size_t print(unsigned long, int = DEC);
^~~~~
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:73:12: note: conversion of argument 1 would be ill-formed:
C:\Users\Dhruvil\OneDrive\Documents\Arduino\sketch_jun26d\sketch_jun26d.ino:66:46: warning: invalid conversion from 'const char*' to 'long unsigned int' [-fpermissive]
lcd.print("Body Motor Speed: ", (val2 - 90)); // write this string on the top row
^
sketch_jun26d:68:44: error: no matching function for call to 'print(const char [18], int)'
lcd.print("Cam Motor Speed: ", (val - 90)); // pad string with spaces for centering
^
In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Stream.h:26:0,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/HardwareSerial.h:29,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:233,
from sketch\sketch_jun26d.ino.cpp:1:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:69:12: note: candidate: size_t Print::print(unsigned char, int) <near match>
size_t print(unsigned char, int = DEC);
^~~~~
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:69:12: note: conversion of argument 1 would be ill-formed:
C:\Users\Dhruvil\OneDrive\Documents\Arduino\sketch_jun26d\sketch_jun26d.ino:68:44: warning: invalid conversion from 'const char*' to 'unsigned char' [-fpermissive]
lcd.print("Cam Motor Speed: ", (val - 90)); // pad string with spaces for centering
^
In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Stream.h:26:0,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/HardwareSerial.h:29,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:233,
from sketch\sketch_jun26d.ino.cpp:1:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:70:12: note: candidate: size_t Print::print(int, int) <near match>
size_t print(int, int = DEC);
^~~~~
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:70:12: note: conversion of argument 1 would be ill-formed:
C:\Users\Dhruvil\OneDrive\Documents\Arduino\sketch_jun26d\sketch_jun26d.ino:68:44: warning: invalid conversion from 'const char*' to 'int' [-fpermissive]
lcd.print("Cam Motor Speed: ", (val - 90)); // pad string with spaces for centering
^
In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Stream.h:26:0,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/HardwareSerial.h:29,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:233,
from sketch\sketch_jun26d.ino.cpp:1:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:71:12: note: candidate: size_t Print::print(unsigned int, int) <near match>
size_t print(unsigned int, int = DEC);
^~~~~
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:71:12: note: conversion of argument 1 would be ill-formed:
C:\Users\Dhruvil\OneDrive\Documents\Arduino\sketch_jun26d\sketch_jun26d.ino:68:44: warning: invalid conversion from 'const char*' to 'unsigned int' [-fpermissive]
lcd.print("Cam Motor Speed: ", (val - 90)); // pad string with spaces for centering
^
In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Stream.h:26:0,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/HardwareSerial.h:29,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:233,
from sketch\sketch_jun26d.ino.cpp:1:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:72:12: note: candidate: size_t Print::print(long int, int) <near match>
size_t print(long, int = DEC);
^~~~~
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:72:12: note: conversion of argument 1 would be ill-formed:
C:\Users\Dhruvil\OneDrive\Documents\Arduino\sketch_jun26d\sketch_jun26d.ino:68:44: warning: invalid conversion from 'const char*' to 'long int' [-fpermissive]
lcd.print("Cam Motor Speed: ", (val - 90)); // pad string with spaces for centering
^
In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Stream.h:26:0,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/HardwareSerial.h:29,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:233,
from sketch\sketch_jun26d.ino.cpp:1:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:73:12: note: candidate: size_t Print::print(long unsigned int, int) <near match>
size_t print(unsigned long, int = DEC);
^~~~~
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:73:12: note: conversion of argument 1 would be ill-formed:
C:\Users\Dhruvil\OneDrive\Documents\Arduino\sketch_jun26d\sketch_jun26d.ino:68:44: warning: invalid conversion from 'const char*' to 'long unsigned int' [-fpermissive]
lcd.print("Cam Motor Speed: ", (val - 90)); // pad string with spaces for centering
^
sketch_jun26d:70:45: error: no matching function for call to 'print(const char [18], int)'
lcd.print("Can Motor Speed: ", (val1 - 90)); // pad with spaces for centering
^
In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Stream.h:26:0,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/HardwareSerial.h:29,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:233,
from sketch\sketch_jun26d.ino.cpp:1:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:69:12: note: candidate: size_t Print::print(unsigned char, int) <near match>
size_t print(unsigned char, int = DEC);
^~~~~
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:69:12: note: conversion of argument 1 would be ill-formed:
C:\Users\Dhruvil\OneDrive\Documents\Arduino\sketch_jun26d\sketch_jun26d.ino:70:45: warning: invalid conversion from 'const char*' to 'unsigned char' [-fpermissive]
lcd.print("Can Motor Speed: ", (val1 - 90)); // pad with spaces for centering
^
In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Stream.h:26:0,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/HardwareSerial.h:29,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:233,
from sketch\sketch_jun26d.ino.cpp:1:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:70:12: note: candidate: size_t Print::print(int, int) <near match>
size_t print(int, int = DEC);
^~~~~
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:70:12: note: conversion of argument 1 would be ill-formed:
C:\Users\Dhruvil\OneDrive\Documents\Arduino\sketch_jun26d\sketch_jun26d.ino:70:45: warning: invalid conversion from 'const char*' to 'int' [-fpermissive]
lcd.print("Can Motor Speed: ", (val1 - 90)); // pad with spaces for centering
^
In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Stream.h:26:0,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/HardwareSerial.h:29,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:233,
from sketch\sketch_jun26d.ino.cpp:1:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:71:12: note: candidate: size_t Print::print(unsigned int, int) <near match>
size_t print(unsigned int, int = DEC);
^~~~~
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:71:12: note: conversion of argument 1 would be ill-formed:
C:\Users\Dhruvil\OneDrive\Documents\Arduino\sketch_jun26d\sketch_jun26d.ino:70:45: warning: invalid conversion from 'const char*' to 'unsigned int' [-fpermissive]
lcd.print("Can Motor Speed: ", (val1 - 90)); // pad with spaces for centering
^
In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Stream.h:26:0,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/HardwareSerial.h:29,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:233,
from sketch\sketch_jun26d.ino.cpp:1:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:72:12: note: candidate: size_t Print::print(long int, int) <near match>
size_t print(long, int = DEC);
^~~~~
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:72:12: note: conversion of argument 1 would be ill-formed:
C:\Users\Dhruvil\OneDrive\Documents\Arduino\sketch_jun26d\sketch_jun26d.ino:70:45: warning: invalid conversion from 'const char*' to 'long int' [-fpermissive]
lcd.print("Can Motor Speed: ", (val1 - 90)); // pad with spaces for centering
^
In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Stream.h:26:0,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/HardwareSerial.h:29,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:233,
from sketch\sketch_jun26d.ino.cpp:1:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:73:12: note: candidate: size_t Print::print(long unsigned int, int) <near match>
size_t print(unsigned long, int = DEC);
^~~~~
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:73:12: note: conversion of argument 1 would be ill-formed:
C:\Users\Dhruvil\OneDrive\Documents\Arduino\sketch_jun26d\sketch_jun26d.ino:70:45: warning: invalid conversion from 'const char*' to 'long unsigned int' [-fpermissive]
lcd.print("Can Motor Speed: ", (val1 - 90)); // pad with spaces for centering
^
sketch_jun26d:72:35: error: no matching function for call to 'print(const char [8], int&)'
lcd.print("Light: ", (light1map));
^
In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Stream.h:26:0,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/HardwareSerial.h:29,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:233,
from sketch\sketch_jun26d.ino.cpp:1:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:69:12: note: candidate: size_t Print::print(unsigned char, int) <near match>
size_t print(unsigned char, int = DEC);
^~~~~
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:69:12: note: conversion of argument 1 would be ill-formed:
C:\Users\Dhruvil\OneDrive\Documents\Arduino\sketch_jun26d\sketch_jun26d.ino:72:35: warning: invalid conversion from 'const char*' to 'unsigned char' [-fpermissive]
lcd.print("Light: ", (light1map));
^
In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Stream.h:26:0,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/HardwareSerial.h:29,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:233,
from sketch\sketch_jun26d.ino.cpp:1:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:70:12: note: candidate: size_t Print::print(int, int) <near match>
size_t print(int, int = DEC);
^~~~~
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:70:12: note: conversion of argument 1 would be ill-formed:
C:\Users\Dhruvil\OneDrive\Documents\Arduino\sketch_jun26d\sketch_jun26d.ino:72:35: warning: invalid conversion from 'const char*' to 'int' [-fpermissive]
lcd.print("Light: ", (light1map));
^
In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Stream.h:26:0,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/HardwareSerial.h:29,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:233,
from sketch\sketch_jun26d.ino.cpp:1:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:71:12: note: candidate: size_t Print::print(unsigned int, int) <near match>
size_t print(unsigned int, int = DEC);
^~~~~
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:71:12: note: conversion of argument 1 would be ill-formed:
C:\Users\Dhruvil\OneDrive\Documents\Arduino\sketch_jun26d\sketch_jun26d.ino:72:35: warning: invalid conversion from 'const char*' to 'unsigned int' [-fpermissive]
lcd.print("Light: ", (light1map));
^
In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Stream.h:26:0,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/HardwareSerial.h:29,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:233,
from sketch\sketch_jun26d.ino.cpp:1:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:72:12: note: candidate: size_t Print::print(long int, int) <near match>
size_t print(long, int = DEC);
^~~~~
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:72:12: note: conversion of argument 1 would be ill-formed:
C:\Users\Dhruvil\OneDrive\Documents\Arduino\sketch_jun26d\sketch_jun26d.ino:72:35: warning: invalid conversion from 'const char*' to 'long int' [-fpermissive]
lcd.print("Light: ", (light1map));
^
In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Stream.h:26:0,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/HardwareSerial.h:29,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:233,
Multiple libraries were found for "Servo.h"
from sketch\sketch_jun26d.ino.cpp:1:
Used: C:\Users\Dhruvil\OneDrive\Documents\Arduino\libraries\Servo
Not used: C:\Program Files (x86)\Arduino\libraries\Servo
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:73:12: note: candidate: size_t Print::print(long unsigned int, int) <near match>
size_t print(unsigned long, int = DEC);
^~~~~
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:73:12: note: conversion of argument 1 would be ill-formed:
C:\Users\Dhruvil\OneDrive\Documents\Arduino\sketch_jun26d\sketch_jun26d.ino:72:35: warning: invalid conversion from 'const char*' to 'long unsigned int' [-fpermissive]
lcd.print("Light: ", (light1map));
^
exit status 1
no matching function for call to 'print(const char [19], int)'
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
With the following code:
#include <Servo.h>
/*****************************************
* name: I2C LCD2004
* function: You should now see your I2C LCD2004 display "Hello,world!","IIC/I2C LCD2004"
* "20 cols, 4 rows","www.sunfounder.com"
********************************/
//Email:service@sunfounder.com
//Website:www.sunfounder.com
/********************************/
// include the library code
#include <Servo.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,20,4); // set the LCD address to 0x27 for a 16 chars and 2 line display
Servo myservo; // create servo object to control a servo
Servo myservo1; // create servo object to control a servo
Servo myservo2;
int potpin = A0; // analog pin used to connect the potentiometer
int val; // variable to read the value from the analog pin
int potpin1 = A1; // analog pin used to connect the apotentiometer
int val1; // variable to read the value from the analog pin
int potpin2 = A2;
int val2;
int light1 = A3;
int light1map;
/*********************************************************/
void setup()
{
myservo.attach(9); // attaches the servo on pin 9 to the servo object
myservo1.attach(10); // attaches the servo on pin 10 to the servo object
myservo2.attach(11);
lcd.init(); //initialize the lcd
lcd.backlight(); //open the backlight
}
/*********************************************************/
void loop()
{
light1 = analogRead(A3); // read and save value from PR
val = analogRead(potpin); // reads the value of the potentiometer (value between 0 and 1023)
val1 = analogRead(potpin1);
val2 = analogRead(potpin2);
val = map(val, 0, 1023, 90, 180); // scale it for use with the servo (value between 0 and 180)
val1 = map(val1, 0, 1023, 90, 180);
val2 = map(val2, 0, 1023, 90, 180);
light1map = map(light1, 0, 1023, 0, 100);
if(light1 > 550) {
myservo.write(val); // sets the servo position according to the scaled value
myservo1.write(val1);
myservo2.write(val2);
delay(45); // waits for the servo to get there
}
lcd.setCursor ( 0, 0 ); // go to the top left corner
lcd.print("Body Motor Speed: ", (val2 - 90)); // write this string on the top row
lcd.setCursor ( 0, 1 ); // go to the 2nd row
lcd.print("Cam Motor Speed: ", (val - 90)); // pad string with spaces for centering
lcd.setCursor ( 0, 2 ); // go to the third row
lcd.print("Can Motor Speed: ", (val1 - 90)); // pad with spaces for centering
lcd.setCursor ( 0, 3 ); // go to the fourth row
lcd.print("Light: ", (light1map));
}
/************************************************************/
How do I fix this error?