For this project we will print on the LCD display how many times the button is pressed. The steps are shown in the video above.
Select the used inputs and outputs on the simulator. In this case we use a LED on digital pins 13, LCD display on digital pins 12, 11, 5, 4, 3 and 2 and a button on digital pin 10. Connect the Arduino with the COM port in the simulator and start simulating.
The instructions lcd.print and lcd.autoscroll will be changed to lcdprint and lcdautoscroll without a dot (.) in the instruction. This is the only change you make to the instructions.
The instructions that communicate with the simulator are based on similar Arduino codes. Only the first letter needs to be replaced by a capital letter, remove the dot in the instruction with a dot ‘.’ and your ready to simulate.
The simulator library codes are as follows:
digitalWrite becomes DigitalWrite
lcd.print becomes lcdprint
Instructions Arduino IDE Instructions Arduino IO Simulator
digitalWrite(x,y); DigitalWrite(x,y)
digitalRead(x); DigitalRead(x);
analogWrite(x,y); AnalogWrite(x,y);
analogRead(x); AnalogRead(x);
myservo.write(x); myservowrite(x);
Serial.print(x); Serialprint(x);
tone(x,y ,z); Tone(x,y ,z);
noTone(x); NoTone(x);
lcd.setCursor(x,y); lcdsetCursor(x,y);
lcd.print(longx); lcdLprint(x);
lcd.print(“x”); lcdprint(“x”);
lcd.autoscroll(); lcdautoscroll();
lcd.noAutoscroll(); lcdnoAutoscroll();
lcd.clear(); lcdclear();
lcd.display(); lcddisplay();
lcd.noDisplay(); lcdnoDisplay();
lcd.blink(); lcdblink();
lcd.noBlink(); lcdnoBlink();
lcd.write(x); lcdwrite(x);
lcd.rightToLeft(); lcdrightToLeft();
lcd.leftToRight(); lcdleftToRight();
lcd.home(); lcdhome();
lcd.cursor(); lcdcursor();
lcd.scrollDisplayLeft(); lcdscrollDisplayLeft();
lcd.scrollDisplayRight(); lcdscrollDisplayRight();