Downloads
What you need to know before starting your first project
Your 10 First Projects (Hero / UNO R3)
The 37 in 1 Sensor Kit
Learning Components
Resources
Your First 10 Projects With The Arduino/HERO Simulator
Code Like A Wizard
Wizard Coding

Lesson 02: Simulation steps

Step 1

In this project we will light up an LED when we click on a button. This example can be found by the examples provided in the simulator. The steps are shown in the video above. The only imported thing is that you chance the simulator instructions with a capital letter. When the library and serial communication code is present it’s easy to simulate your project.

Step 2

Select the used inputs and outputs on the simulator. In this case we use an LED on digital pin 13 and a button on digital pin 2. Connect the Arduino with the COM port in the simulator and start simulating.

You can restore saved setups by going under File and choose for ‘Restore settings’. Select the setup file and all the saved settings will be restored.

Instructions

The instructions that communicate with the simulator are based on similar Arduino codes. The simulator library codes are as follows:

digitalWrite becomes DigitalWrite

lcd.print becomes lcdprint

Full list

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();