Buy from US Buy from UK Buy from DE Buy from IT Buy from FR Buy from ES Buy from JP

In this lesson, you will learn how to install mBlock Graphic programming software to program OSOYOO Robot kit

  1. A laptop or Desktop PC which runs Windows or Mac  computer
  2. OSOYOO Magic I/O Shield for Arduino x1
  3. Red LED Module x 1
  4. OSOYOO 3-Pin PnP cable x 1
  5. USB Cable x 1

Firstly, please plug Osoyoo Magic I/O shield into UNO board as following:

Secondly, connect LED module to D3 port as following:

Finally, use the USB cable to connect your PC to the OSOYOO UNO board

Step 1) Download mBlock PC https://mblock.makeblock.com/en-us/download/, select the download file as per your computer OS type:

Step 2)Download OSOYOO_UNO.mext device file from https://osoyoo.com/driver/mblock/osoyoo_uno.mext

Step 3) Run the mBlock PC software by double click the lovely Panda icon. you will see mBlock UI as following picture. Please delete the default device   CyberPi by click the cross in the red circle.

Step 4: Drag and Drop osoyoo_uno_mext file(downloaded in Step 2) to mBlock software as following:

Now you will see a new device firmware in mBlock, see following picture:

Now mBlock software and OSOYOO_UNO device firmware have been successfully installed in our PC!

Make    blinking LED program with blocks

In order to make D3 port LED blinking, our plan is to turn on LED for 1 second, then turn off it for another 1 second and repeat this procedure continuously.

Now we will show you how to use blocks to turn above idea into reality.
Step 1: Click Control, then Drag and drop Forever block to programming area as following:

Step 2: Click Light,   Drag and drop LED pin HIGH block inside Forever Block , then change pin number from 13 to 3 as following:

Step 3: Click Control,   Drag and drop Wait 1 seconds block below LED pin block, see following:

Step 4: Right click LED pin block  and then click Duplicate, you will generate a copy of LED pin block and wait 1 seconds block, put these two new blocks below old block and change the 2nd LED block from HIGH to LOW ,see following:

Step 5) Click Event , then drag  a when Arduino UNO starts up block to the very top of the programming blocks, see following:

Now all the programming   blocks have been completed! From above picture, the logic is pretty straightforward:
When Arduino is started,  computer will enter a dead loop which will turn on LED in D3 for 1 second, then turn off this LED for 1 second back and forth forever.

Upload the program to Arduino

1)you need connect your Arduino board to your PC with a USB cable first. Then click the Connect button in the bottom of the mBlock software, you will see a USB window pop up,
2) select Show  all connectable device check box , then a device drop-down menu will show up,
3) select your Arduino port from device drop-down menu
4) click Connect button to  connect your PC to Arduino

5)After you PC is connected to Arduino UNO board,  please click Upload button in the bottom of your software, then the code will be uploaded to Arduino UNO board:

Now the LED in D3 port will blink continuously.