Arduino Simulator App Review

Arduino Simulator App Review

Arduino Simulator Review – Start Developing Without a Real Arduino Board

We had stumbled across this Arduino simulator, in which you can use both electronics and you Arduino skills to be able to test your circuit before buying the necessary component or just to prevent you having a fried Arduino.

This Arduino simulator is free and works really great, although it has one major downside, the sketches have to be saved in .hex files then imported into the simulator but other than that it’s a really great app to have. Once you get the hang of creating the hex files it is actually not too bad and it becomes quite effortless.

 

 

Below is a simple explanation on how to use the Simulide Arduino simulator.

First, you will have to download Simulide.zip and extract the entire archive to your desired folder. If you run the executable from within the archive some functions will not be available. After extraction process has completed you can run the executable (.exe).

Next, build your circuit, remember to adjust the resistor values, on the left click on Properties and double click on the resistance value.

 

 

After you have built your circuit you can compile your sketch into a HEX file. In your Arduino IDE make sure your sketch is saved then go to Sketch->Export compiled Binary, or press Ctrl->Alt->S.

Now it’s time to load your sketch into the simulator, Right-click on the Arduino and select “Load firmware” and load your HEX flie you just exported, there will be two HEX files “xx.ino.standard.hex” and “xx.ino.with_bootloader.standard.hex” you have to select the one without the bootloader.

You are all set now and you can click on the power button at the top.

Another great Feature

The probe is another great feature the app has. Put the probe on up to four of your output pins and right click on it and select add to plotter.

Please note that this might look like an oscilloscope but it is a logic analyzer and will not work with PWM signals, for PWM signals select “Add to Oscope” instead of “Add to plotter”

Control with the Arduino bluetooth module

Control with the Arduino bluetooth module

We found this incredible tutorial on how to use the HM-10 BLE Arduino Bluetooth module by Hammad Tariq

connections_hn10_arduinoIn this tutorial, you will learn about controlling a LED using HM-10 BLE Arduino bluetooth module, Arduino and Evothings Studio.

Last Summer, I wrote a tutorial about controlling the lights of your home using Arduino and HC-05 bluetooth module. While, HC-05, HC-06 and HC-09 are still famous and available everywhere, they are essentially based on Bluetooth 2.0 technology. On the other hand, many new smartphones support only BLE (Bluetooth Low Energy or Bluetooth 4.0) instead of Bluetooth 2.0 or Bluetooth 1.0. The iPhone is most prominent of those smartphones as it’s supporting BLE since iPhone 4S, which was released nearly 5 years ago!

As I sat down to explore what options we have for prototyping a BLE enabled IoT device, the HM-10 came up as a prominent module in this space as it’s inexpensive and available everywhere. The module is also based on already familiar TI’s CC2541 BLE SoC. The module also has a few clones; one is called BT-05, another is called AT09, yet another is known as the SPP-CA HC-05/HC-06 or BT06, yet some clones are based on ZS-040 breakout boards just like HC-05.

There is an excellent post by Martyn Currey if you want to identify the module you have or want to explore the differences between them. Essentially, if your module is based on CC2541, that is BLE and you should be able to use this tutorial with the exception of UUID of the module, that I will explain later in the tutorial. Also, HM-10 and all other clones use AT commands for configuration, you can read the datasheets for reference but this tutorial or mobile app does not need you to use any AT command.

In addition to the HM-10 and Arduino, I will be using Evothings Studio to develop our mobile app. Evothings Studio is ideal for developing IoT mobile apps as it’s easy to use, gets you started in minutes even if you have “some” knowledge of JavaScript and HTML. Also, it has useful pre-built libraries and plugins, such as, for this example, the Evothings Studio already has necessary libraries to work with BLE, all you need is to write down a few lines of code to connect and send commands to your BLE module.

Step1: What you will need.

 

 

 

1 x HM-10 or anyother similar Arduino bluetooth module
1 x Arduino Uno
1 x LED
1 x 220 ohm resistor

 

Step 2: Connect the circuit

 

 

Connect the Arduino and Bluetooth module pins as shown below.

  1. Connect 3.3V of Arduino to the VCC of HM-10
  2. Connect GND of Arduino to the GND of HM-10
  3. Connect D8 of Arduino to RX of HM-10
  4. Connect D7 of Arduino to TX of HM-10
  5. Connect D2 of Arduino to the long leg of LED along with a 220 ohm resistor
  6. Connect the short leg of LED with the GND of Arduino

 

HM-10 and Arduino Wiring Diagram

HM-10 AND ARDUINO WIRING DIAGRAM

 

 

 

Step 3: Upload the Arduino Sketch

 

 

Go to my Github repository and download/copy-paste the Arduino sketch to your Arduino IDE. Upload the sketch to your Arduino.

Step 4: Download the Evothings Studio

You can skip to next step if you already have Evothings Studio and are familiar with it’s working.

Follow these steps:

  1. Download and install Evothings Workbench on your computer. Generate an anonymous Cloud Key further down on the download page, paste it into the Workbench software.
  2. Download Evothings Viewer app from an appstore (iOS, Android)
  3. Open Evothings Workbench and click on “Get Key” button
  4. Open Evothings Viewer app, provide your connection key and tap the “connect” button
  5. Once the connection is successful, go to “Examples” tab and click the “Run” button for the “Hello World” example

You should see the “Hello World” app loaded into the Evothings Viewer; that is how the whole development suite works together, whatever changes you will make in your app code, the Evothings Workbench will reload it in the Evothings Viewer, allowing you to preview your changes in real time!

Step 5: Developing the Mobile App

On Evothings Workbench, click “Run” for “BLE Scan” example and note down the name of your BLE module.

Clone or download this Github repository on your computer. Open “hm10-arduino-ble” example, go to “app folder”, drag & drop the “index.html” to “My Apps” tab of Evothings Workbench.

Now open “index.html” in your favourite code editor, check “app.connect” function to confirm if your module has the same name as written in the code, else change it with your module’s name.

Now click the “Run” for your new project entry in “My Apps” tab, the app should load in Evothings Viewer, press the “Connect” button. Once connected, use the buttons to switch your LED On/Off.

Tip: If you experience any difficulty in connecting with your module, first identify which module do you have and then search for it’s UUID (universal unique identifier) online. Correct UUID should be given in the app.ledOn and app.ledOff functions of index.html.

Code Explanation

As explained earlier, the Evothings Studio comes bundled with all necessary libraries to connect and get you started with BLE. Our example is making use of arduinoble and easyble libraries which are located in app/libs/evothings directory. See this tutorial on more details about them. As, for now, we don’t need to go in detail of how these libraries are working, we can just focus on the code in the “index.html” file.

Following block of code is used to connect to the BLE module:


app.connect = function()
{
evothings.arduinoble.close();
evothings.arduinoble.connect(
'BT05', // Name of the module.
function(device)
{
app.device = device;
app.showMessage('Connected! Touch buttons to turn LED on/off.');
},
function(errorCode)
{
app.showMessage('Connect error: '   errorCode   '.');
});
};

In this block of code, we are providing the name of the module to the library function of evothings.arduinoble.connect, upon success, we show a success message.

Similarly, analyze following block of code:


// Turn on LED.
app.ledOn = function()
{
app.device && app.device.writeDataArray(new Uint8Array([1]), '0000ffe1-0000-1000-8000-00805f9b34fb');
}
// Turn off LED.
app.ledOff = function()
{
app.device && app.device.writeDataArray(new Uint8Array([0]), '0000ffe1-0000-1000-8000-00805f9b34fb');
}

In this block of code, we are calling library function app.device.writeDataArray to write 0 and 1 to the BLE module along with the UUID of HM-10 module.

In the Arduino sketch, analyze the following block of code:


void loop() {
int c;
if (mySerial.available()) {
c = mySerial.read();
Serial.println("Got input:");
if (c != 0)
{
// Non-zero input means "turn on LED".
Serial.println("  on");
digitalWrite(LED_PIN, HIGH);
}
else
{
// Input value zero means "turn off LED".
Serial.println("  off");
digitalWrite(LED_PIN, LOW);
}
}
}

In this block of code, we are reading the software serial of Arduino. We simply switch the LED on if we receive anything other than 0 on the software serial, similarly, if it’s 0, we turn the LED off.

You can also check the serial monitor of Arduino IDE to see what you are receiving on Arduino’s software serial.

Arduino online training with 22 projects

Arduino online training with 22 projects

Arduino online training

Arduino online training

What is better than an Arduino training kit? …..

Arduino Online Training To Go With It, of cause.

We WANT you to become the next extraordinary electronics maker and we want that journey to be fast and fun.

No more having to search around for hours to try and find answers to your questions. And even more importantly – you have full access to the trainers to get you unstuck when running into problems.

Trainers

Direct access to the trainers to keep you moving along smoothly

Training material

Step by step PDF’s, videos, datasheets and resources all in one place.

Quizes

More than 150 quiz questions. Test your understanding and learn those things you missed

Forum

Forums are used to view questions and answers from fellow students and to ask your own.

22 Projects to build and explained in detail in the Arduino online training!

Building and experimenting with what you learn is crucial and it is also the fun part of your training. Each topic covered in the Arduino online training is accompanied by practical projects to make sure you can not just study but DO!

It’s simple, start from the top and work your way trough each of the 25 topics. Each topic consists of training materials, component datasheets, quizzes and a link to the forum section.

No guessing or searching for hours to find information, everything you need regarding a topic is available inside the topic.

Forums

Our forums will be one of the most important resources tor you. Here you will find questions and answers from other students and that is a learning experience as well.

You can also post your own questions and unlike other forums, you might have seen we will answer questions in detail. Each forum section is covering a specific training topic so that you can focus specifically on the topic.

Quizzes

Quizzes might not sound like a training resource but it is an important one.

It does not only test your understanding and help you find information, you might have missed but also gives you a great idea of what information is most important to know.

It makes you think more and look at things from different “angles”. It also gets you to re-study your training material so you go a second time over it.

It also helps you to practice for the final exam if you are interested in a Bot Shop Maker Certificate.