Question: #include mbed.h #include uLCD_4DGL.h // LCD snd Joystick setting BusIn Right(A0); BusIn Down(A1); BusIn Left(A2); BusIn Center(A3); BusIn Up(A4); float m = 20; void initialize();
#include "mbed.h" #include "uLCD_4DGL.h"
// LCD snd Joystick setting BusIn Right(A0); BusIn Down(A1); BusIn Left(A2); BusIn Center(A3); BusIn Up(A4); float m = 20;
void initialize();
// Main
int main()
{
initialize();
while(1)
{
//Operations by Joystic
if (Up)
{
lcd.printf("");
m++;
}
if (Down)
{
lcd.printf("");
m--;
}
lcd.locate(0,12);
lcd.printf("Minimum value is %0.0f",m);
wait(0.5);
}
}
void initialize()
{
lcd.cls();
lcd.locate(0,0);
}
having trouble with my code I'm using mbed C++, I don't know what to put for print. I'm trying to make the lcd screen output the joystick movements, please help. Also please correct anything else wrong with my code.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
