Userguide ArduinoSimulator MacOS Englisch
Userguide ArduinoSimulator MacOS Englisch
Introduction
The Arduino UNO Simulator is made for quick tests and small projects. there is still
further developed in order to obtain the widest possible I/O functions. The Arduino
Simulator is designed to test a program quickly with the Arduino UNO without real-
ly having connections to external I/O (buttons, potentiometers, display, 7 segment
display, ...).
• - Java JDK
• - The Arduino simulation program
• - The Arduino software
In order to use the Simulator we need to download the Java JDK on our MacBook or
iMac, you can find the download link on the website of Xevro. Or go to this link and
download the MacOS version:
www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-
2133151.html
Arduino software
For we start using the Arduino Simulator we need the Arduino software, it is also free
available on the Arduino website: http://arduino.cc/en/Main/Software
Installation guide
1. Before you can use the Arduino Simulator you will need to install the Java JDK.
On Windows computers it’s enough to install the basic Java JRE.
The Java JDK isn’t automatically installed and the simulator will not run without
the Java JDK.
www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-
2133151.html
3. The first time when you start the Arduino Simulator you will get a window pop-
up that asks to give your password. This is to change the permissions of the Ja-
va/extensions folder where the Serial driver needs to come. It will close automati-
cally after type in your password. This will just happen ones.
5. Copy the license key in the Arduino Simulator of the website page.
License activation
The Arduino Simulator is free available to use. The first time you open the
Simulator there will be an activation pops up where you can activate the Simulator.
Click on the ‘Change Product Key’ to insert the license key you copied on the
website. To vivificate the license key you click on the ‘Activate’ button.
How to use it
The Arduino Simulator is very easy to understand. The simulator needs 5 simple
things in order to work correctly.
Only the digital and analog pins that are available on the Simulator can be used!
Disconnect the Arduino Simulator before uploading the Arduino code.
2. Upload your custom Arduino code with the corresponding library file
Open the simulator and go to 'Help -> Arduino UNO programming code -> Arduino
UNO programming code (Ino)’.
This will open a Arduino (ino) file with the corresponding library and important
code in it.
5. Connect the Arduino Simulator to the Arduino board with the right serial port
The Arduino Simulator knows which port is the Arduino board.
Make sure the Arduino is disconnect while uploading the Arduino code.
Code Changes
The Arduino program works with instructions that the I/O read and write, we must
convert this to serial communication, now we need to write new instructions for
this.
We don’t want to change the real instructions so we decided to make the first
character as a capital. And the instructions with a point in it are changed with no
point.
Example:
digitalWrite(12, HIGH);
become DigitalWrite(12, HIGH);
1. Open a ‘ino’ file from the Arduino Simulator: go to Help -> Arduino UNO
programming code -> Arduino UNO programming code (Ino).
2. Change your code with the right instructions (the list of instructions are on
the next page)
3. Upload your code, done!
attention:
Remember to adjust the 'Void Setup to initialize the real I/O!!
Attention:
- At start-up, we also see the state of the simulator at the bottom of the serial port:
- Once you have selected the correct serial port changes to this text:
You will get a error message when you want to connect with a pin that is already
used.
Buttons
- When you keep pressing it send a ‘1’ to the Arduino
- No pressing send an ‘0’ to the Arduino
- With this button:
Leds
- We have 14 leds, each led coupled to one output D0… D13.
- After each selected led turns the combobox green.
- There is a text box for comments.
- If you click on the led you change the color of the led. Available colors:
Red, Green, Blue and Yellow. It’s also possible to use a relay as output.
Buzzer
7 segment Display
Sound detector
- The sound detector may be coupled to one of the 6 analog inputs A0…A5 (value of 0
<-> 1023), The combobox change into yellow after selection.
- This detector records no sound just responding to a noise level adjustable with the
slider.
- Once the recording is started it will be nothing more to serve on the screen
because it is continuously listened to the microphone.
- When the noise level is exceeded, the progress bar will show the noise level in
percent.
- Once detection has addressed this value is (value of 0 <-> 1023) sent to the Arduino,
which can also be read on the simulator.
- There are 2 analogue outputs which first met slider and one filled progress bar
- Both of these outputs can be coupled separately to one of each analog output 6
PWM 3, 5, 6, 9, 10 and 11 (value of 0 <-> 1023)
- The combobox change into pink after selection.
- There is a text box for comments.
- The analog output can be read on the simulator.
Sound generator
- The sound generator can be coupled to one of the 6 analog outputs PWM 3, 5, 6, 9,
10 and 11
(value of 0 <-> 1023)
- The combobox change into pink after selection.
- There is a text box for comments.
- The analog output of the Arduino can be read on the simulator.
Servo
- The servo is automatically connecting to the output D12 after pressing on the
button.
- There is a text box for comments.
- On the big screen we can see the analog output value (servo mode) from the
Arduino UNO.
LCD display
Attention:
The difference with the real display is the bottom row starts from right to left, this
one should keep in mind during programming. It’s also not possible to separately
control the pixels.
Tone Melody
- The Tone Melody will automatically connection to the output D8.
- Through the Arduino UNO can send a note to the MAC which one can read the
frequency and duration. You can use this for
example in order to create a mini piano by means
of the 8 input buttons.
Squarewave generator
- The squarewave generator can connect to one of the 6 inputs A0 – A5, this in-
puts (A0 – A5) need to declared in a digital input. The Analog pins can be used
as Digital pins, they got the configuration: A0 = D14, A1 = D15, …
- The squarewave generator can make a squarewave with a frequency of 0,1 to
10Hz.
The great advantage of this is that we don’t need to shut down the Simulator
whenever we want to upload the sketch simulator.
After downloading the simulator, we connect again with the serial port and we ini-
tialize the I/O.
Save Restore
Screen resolution
We have 6 options:
Languages
You can choose the languages: Dutch or English.
The BaudRate and serial port of the Arduino UNO and the simulator should be identical, if
not they can’t connect to each other.
To send and receive data we need to make a type of protocol/structure so that the Mac
and Arduino UNO understand each other. The following protocols are bin used in the
Simulator.
Examples Structure serial message between the Arduino UNO and the Arduino
Simulator (java)