Programming Your Edison With Wyliodrin

by AlexB23 in Circuits > Sensors

3906 Views, 28 Favorites, 0 Comments

Programming Your Edison With Wyliodrin

skitch.png

The Edison board is a small computer. It has connections for power, USB ports, and connectors for a CPU (computing unit) and a port to connector the sensor board (more on this later)

To get the Edison board ready to work, follow the steps in this instructable HERE . The Edison board has to be prepared before you can program it in Wyliodrin.

A Few Important Things to Remember

loop with temperature.png

  • Check that you have followed the instructions on each step before continuing to the next step.
  • Check that the program works the way you expect to work before you add new blocks.
  • The order of the blocks is critical.
  • The program runs from top to bottom.
  • The Stopped word in Wyliodrin is what you click to start the program. Yes, it is true.

Confirm the Edison Board Is Online

wyliodrin online indicator.png

After the Wyliodrin software is installed, restart the Edison board. When the board is online, you will see the indicator in Wyliodrin change from offline to online.

Now you are ready to start building your application and run it on your board.

Connect the LCD and Temperature Sensor to the Edison Board

base shield V2.jpg
temperature sensor.jpg
grove lcd.jpg
grove cable.jpg
edison breakout board connections.png

All the materials that will be used come from this kit: http://www.seeedstudio.com/depot/Grove-starter-kit-plus-Intel-IoT-Edition-for-Intel-Galileo-Gen-2-and-Edison-p-1978.html

First: Connect the baseboard module that has the connectors for the sensors. Gently align the pins with the corresponding connector in the Edison board and push the baseboard module down.

Second: Connect a cable to the LCD, then connect the other end of the cable to one of the ports on the baseboard module labeled I2C. Choose any port.

Third: Connect a cable to the temperature sensor and the other end of the cable to the baseboard module. The temperature sensor is analog, so it will be connected to one of the A ports, like A0.

Create the New Application Space

create new application.png
new application components.png
new application name.png

On Wyliodrin, click on Create new application.

Enter the name of the application, leave the language at the default, Visual programming.

Click Next, and the click Submit.

Click on your application to open the work space.

Drag the purple print block to the trash can at the bottom right of the sceen.

Start Programming the LCD and the Temperature Sensor

wyliodrin-lcd-add.png
559206b94fbadee4e6000556.jpeg
wyliodrin-temp-sensor-add.png
wyliodrin-temp-sensor-add-farenheit.png

The Wyliodrin application makes it easy to program your Edison. You identify the module you are interested in from the menu, then choose the action you want to execute.

First: Click Peripherals, click Grove, click LCD on the left-side panel. When you select it, all the possible options will be displayed to the right. Choose the top two blocks, they will be added to the working area on the right.

Second: Click Sensors, click Grove, click Temperature sensor. Choose the second block ( with Fahrenheit) and it will be added to the working area.

.

Display the Temperature on the LCD

wyliodrin-print-on-lcd.png
wyliodrin-move-temperature-into-print-block.png
wyliodrin-init-print-temp.png

Now that you have defined the LCD and the temperature sensor, it is time to read the temperature from the sensor and display it on the LCD.

First: Assemble the blocks in the order they will run. Select the temperature block and drag it into the Print block to replace the block that is there. Select the replaced block and drag it into the trash can. Now drag the Print block and snap it below the init block.

You are ready to run your program!

Execute Your Program

wyliodrin-run-application.png

To run the program you just built, click on the Stopped word on the left hand side on the Wyliodrin screen.

A new window will display, and your Edison will come to life, displaying on the LCD the temperature from the sensor.

Creating a Loop to Read the Temperature Level Every Second

loop component.png
wyliodrin-add-loop.png
wyliodrin-add-loop-1.png

Now that we know how to read data from a sensor, we are going to create a loop so we read data time and time again.

First: Create a loop. Click on Program, Loops, and select the first block. The block will be added to your work area.

Second: Snap the work you already have to the Loop. The section will snap and now it will repeat every second. You can adjust that by changing the number from 1 to the number of your choice.

Run the program again. Touch the sensor and you will see that the value on the LCD changes.

Demonstration Video

Programming Intel Edison and sensors with Wyliodrin