RuggedBOARD DevWiki
  • RuggedBOARDs Developer Wiki
  • RB-A5D2x
    • Contents
    • Download BSP and Documents
  • G1: Getting Started
    • RB-Quick Start Guide
    • Test all the RB interfaces in 10 mins in command Line
    • Example Program for Interfaces Using Python 3
  • G2: Programming Guide
    • Software Architecture on RB (Software Stack Diagram)
    • RB Interface/Bus Programming using MRAA
    • RB Peripherals programming using UPM
  • G3: How to Do?
    • Modbus on RB
    • RB as Tiny Web Server
    • MQTT Client on RB
    • SQL Lite DB
    • AWS Green Grass on RB
    • Microsoft Azure on RB
  • G4: Use Cases / Application Notes
    • Smart Energy Meter with AWS cloud
    • IoT Based solution for Plants Water monitoring
    • Weather Monitoring Stations
    • FAQ
  • G5: System development Guide
    • Advance Host setup
    • Flash a Bootable SD Card for Rugged board
    • Flash a NOR with Bootable SD Card For Rugged Board A5d2x
    • Flash the NOR using tftp For Rugged Board A5d2x
    • Yocto Compilation For Rugged Board A5d2x
    • Download the Toolchain for Rugged Board A5d2x
    • How to Add New Package in Yocto(root file system)
    • Generate the SDK(toolchain) using YOCTO
    • How to compile the U-Boot for Rugged Board A5d2x
    • How to compile the kernel for Rugged Board A5d2x
  • RB-i.MX6UL
    • Contents
    • Download BSP and Documents
  • G1: Getting Started
    • RB-Quick Start Guide
    • Test all the RB interfaces in 10 mins in command Line
    • Example Program for Interfaces Using Python 3
  • G2: Programming Guide
    • Software Architecture on RB (Software Stack Diagram)
    • RB Interface/Bus Programming using MRAA
    • RB Peripherals programming using UPM
  • G3: How to Do?
    • Modbus on RB
    • MQTT Client on RB
  • G4: System development Guide
    • Advance Host setup
    • Flash a Bootable SD Card for Rugged board
    • Flash a NAND with Bootable SD Card For Rugged Board i.MX6UL
    • Flash the NAND using tftp For Rugged Board i.MX6UL
    • Yocto Compilation For Rugged Board i.MX6UL
    • Download the Toolchain for Rugged Board i.MX6UL
    • How to Add New Package in Yocto(root file system)
    • Generate the SDK(toolchain) using YOCTO
    • How to compile the Barebox for Rugged Board i.MX6UL
    • How to compile the kernel for Rugged Board i.MX6UL
  • G5 : Help Desk
    • FAQ
Powered by GitBook
On this page
  • RuggedBoard Features
  • Specifications
  • Block Diagram
  • Setup your host System to work on RuggedBoard
  • How to write a python3 file and execute in RuggedBoard?
  • Glow and Toggle LED using Python3

Was this helpful?

  1. G1: Getting Started

RB-Quick Start Guide

PreviousDownload BSP and DocumentsNextTest all the RB interfaces in 10 mins in command Line

Last updated 12 months ago

Was this helpful?

RuggedBoard Features

Specifications

Before starting to work with RuggedBoard you have to understand the interfaces available with RuggedBoard.

Block Diagram

Setup your host System to work on RuggedBoard

Components Required

  • USB to microUSB cable

  • A PC/Laptop (Windows or Ubuntu OS)

Installing Ubuntu

After successful installation let us start working with Linux – Ubuntu OS

Step 1: Open an application on your computer called “Terminal” by pressing Ctrl + Alt + T

Step 2: In terminal, type the following for testing of internet and press Enter.

ping www.google.com

Make sure your PC has internet connectivity. If there is no internet please connect to internet and the try again.

Step 3: Install minicom Serial terminal on the host PC to see RB Console.

sudo apt-get install minicom

Step 4: Connect the RuggedBoard to the HOST PC using USB cable provided inside the Box.

Configure Minicom Serial Terminal

Step 5: To find your Serial Port

dmesg | tail

You should see something like

[ 3158.820281] usb 2-1.3: FTDI USB Serial Device converter now attached to ttyUSB0

The port number (ttyUSB0) may vary based on your PC port availability.

If nothing such is shown in the terminal remove and reconnect the USB cable. Now try the command once again.

Step 5: To configureminicomto be used as a Serial terminal by using below command

sudo minicom –s 

Step 6: Select "Serial port setup" and press the respective key as shown below to change the value.

Serialdevice : /dev/ttyUSB0 (Press “A” to modify the device and Press "Enter" to save it)
 
Baudrate : 115200 8N1 (Press “E” to modify the Baudrate and Press "Enter" to save it)
 
Hardware Flow Control : No (Press “F” to modify the Hardware Flow Control and Press "Enter" to save it)
 
Software Flow Control : No (Press “G” to modify the Software Flow Control and Press "Enter" to save it)

step 7: Press the "Enter" on "Save setup as dfl", it will save the modified settings as default and press "Enter" on "Exit".

Step 8: Press “Enter” once the minicom terminal window shows up. It will ask you to enter login credentials if everything is successful. Type "root" as login username and press "Enter". There is no default password for RuggedBoard.

Step 1: Visit the link below to download suitable version of Putty terminal.

Step 2: Install Putty with the default configuration.

Step 3: Connect the USB to micro-USB cable to a windows PC and RuggedBoard-A5D2x respectively.

Once the cable is connected, will be prompted with a USB connected sound on your host PC. But at this point you will not see any mass storage symbol in task-bar/File Manager.

Step 4: Go to Start Menu and Type

device manager

This will Launch device manager of your Host PC. Device manger shows all the device and Devices Connected on the PC.

Step 5: Look for COM port as shown in the image below. Mostly you should look for Ports (COM & LPT).

Your device will be displayed as USB Serial Port (COMx). Here x means the COM port number. In my case its COM8

Step 6: Open Putty.exe installed recently. Click on Serial and replace the COM port with your COM port shown in device manager seen in Step 5. Set the speed as 115200 and click “Open”.

Step 7: Press “Enter” once the terminal window shows up. Type “root” as login username and press enter. There is no default password for RuggedBoard

This section is under Development. Keep Following ...

How to write a python3 file and execute in RuggedBoard?

Goto the data directory and follow the steps as below

Glow and Toggle LED using Python3

Step 1: edit the file using vi command as below

root@rugged-board-a5d2x:~# cd /data/
root@rugged-board-a5d2x:/data# vi blinky.py

To follow these steps you have to understand how to work on the "vi" or "vim" text editor. "vi" is the an text editor available with almost all the Linux distribution including embedded Linux which is very powerful tool for coding and also lightweight. If you want to know how to use vim or vi editor you can follow the small tutorials from the link below:

Step 2: Copy the code below and paste it on the "vi" Editor

#!/usr/bin/env python
'''
Copy and Paste the python code on to your vi editor
and save and exit the editor.
You can also use any other editor from your host PC
to write the code with .py extension and transfer the
python code file to the RuggedBoard. To transfer files
from host PC to RB will be show in the later upcoming
section named as "Transefering files from host PC to RB"
'''

# Author: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
# Copyright (c) 2018 Linaro Ltd.
#
# SPDX-License-Identifier: MIT
#
# Example Usage: Toggles GPIO 23 and 24 continuously in an alternative pattern

import mraa
#import sys
import time

# initialise gpio 61
gpio_1 = mraa.Gpio(61)

# set gpio 61 to output
gpio_1.dir(mraa.DIR_OUT)

# toggle LED ON/OFF
while True:
    print("LED 1 is: ON")
    gpio_1.write(0)
    time.sleep(1)

    print("LED 1 is: OFF") 
    gpio_1.write(1)
    time.sleep(1)

If you want us to see the video demonstration of the work done here please visit the YouTube link below:

Step 3: Save the code and exit from Vi editor back to terminal. Use the commands from the tutorial link given above.

Step 4: Execute the blinky.py program you have recently written.

python3 blinky.py

If everything is correct you should see that the LED is blinking with the set interval of 1000ms (1 Second). Try changing the interval and run the program again.

Step 5: Press Ctrl + C to come back to the terminal or stop execution. Do some alteration in the program for other LEDs and run the program and enjoy.

Host PC requires Ubuntu-16.x.x (LTS versions Recommended), 64-bit. To install Ubuntu, follow the below link.

RuggedBoard-A5D2x
https://help.ubuntu.com/community/GraphicalInstall
https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
https://www.tutorialspoint.com/unix/unix-vi-editor.htm
https://www.youtube.com/channel/UCgMkalLnAn4rGRJ89FFdfSw
Fig: RB Specifications
Fig: RB Block Diagram
Fig: Ubuntu Terminal Window
Fig: internet checking log Terminal Window
Fig: Minicom Configuration menu
Fig: Minicom Configuration menu
Fig: board login prompt
Fig: Device Manager and Putty Configuration Window
Fig: login to rugged board