Arduino simulator

How to use it:
  • start arduino software
  • compile a sketch, the firmware will be saved in temporary directory
  • start the arduino simulator example: `python -m pysimavrgui.examples.sim.arduino` The name of the sketch is displayed on the GUI.
  • after recompiling in arduino select ‘reload’ on simulator GUI

LCD sketch

#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 10, 5, 4, 3, 2);

void setup() {
  lcd.begin(16, 2);
  lcd.print("hello, world!");
}

void loop() {
}
$ python -m pysimavrgui.examples.sim.arduino -c pysimavrgui/examples/arduino/lcd.pde
_images/screenshot_id0.png

LED sketch

void setup() {
  // initialize the digital pin as an output.
  // Pin 13 has an LED connected on most Arduino boards:
  pinMode(13, OUTPUT);     

  digitalWrite(13, HIGH);   // set the LED on
}

void loop() {
}

$ python -m pysimavrgui.examples.sim.arduino -c pysimavrgui/examples/arduino/led.pde
_images/screenshot_id1.png

Table Of Contents

Previous topic

Simulation examples

Next topic

CLI help for examples

This Page