Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

Raspberry Pi QuickStart

Purchase your Raspberry Pi Kit

Tip

To set up and connect this device using the AWS Greengrass Lite SDK, refer to this QuickStart Guide

  1. Introduction
  2. Requirements
  3. Hardware Setup
  4. Image Flashing
  5. Device Setup
  6. Onboard Device
  7. Using the Demo
  8. Resources

1. Introduction

This guide is designed to walk through the steps to connect the Raspberry Pi (4 or 5) to the Avnet /IOTCONNECT platform and demonstrate the standard IoT function of telemetry collection.

Raspberry Pi 5 model is the latest release of Raspberry Pi range. In comparison with its predecessor, it comes with a faster 2.4GHz Broadcom BCM2712, ARM Cortex-A76 CPU and VideoCore VII GPU supporting OpenGL ES 3.1, Vulkan 1.2 and better heat dissipation. There is significant improvement to camera, display, and USB interfacing also. The power-management IC used on Raspberry Pi 5 integrates a real-time clock, and charging circuitry for a button cell which can power the clock while main power is disconnected. Raspberry Pi 5 provides two four-lane MIPI connectors, each of which can support either a camera or a display. These interfacing improvements are delivered by the RP1 I/O controller chip. For the first time, we have Raspberry Pi silicon on a flagship product! The Raspberry Pi 5 is versatile and powerful single board computer that could be used for wide range of applications like DIY projects, educational tool, media center, server, desktop computer and many more IOT application.
Raspberry Pi 4 Model B offers ground-breaking increases in processor speed, multimedia performance, memory, and connectivity compared to the prior-generation Raspberry Pi 3 Model B+, while retaining backwards compatibility and similar power consumption. For the end user, Raspberry Pi 4 Model B provides desktop performance comparable to entry-level x86 PC systems. This product’s key features include a high-performance 64-bit quad-core processor, dual-display support at resolutions up to 4K via a pair of micro-HDMI ports, hardware video decode at up to 4Kp60, dual-band 2.4/5.0 GHz wireless LAN, Bluetooth 5.0, Gigabit Ethernet, USB 3.0, and PoE capability (via a separate PoE HAT add-on). The dual-band wireless LAN and Bluetooth have modular compliance certification, allowing the board to be designed into end products with significantly reduced compliance testing, improving both cost and time to market.

2. Requirements

Hardware

Any of these Raspberry Pi variants will work for this demo:

Software

3. Hardware Setup

See the reference image below for cable connections (image shows a Raspberry Pi 5 but the connections are the same on the Raspberry Pi 4).

Reference Image with Connections
  1. Connect a USB-C cable from a 5V power source (such as your PC) to the USB-C port on your board.
  2. (OPTIONAL) Connect an ethernet cable from your LAN (router/switch) to the ethernet port on the board.
  3. Connect a USB keyboard to one of the USB ports on your board.
  4. Connect the HDMI0 port of your Raspberry Pi to an external monitor using a Micro-HDMI to HDMI cable

4. Image Flashing

  1. Insert the Micro-SD card into your computer (use an adapter if your computer does not have an SD card port).
  2. Open the Raspberry Pi Imager application.
  3. Select the version of your Raspberry Pi.
  4. Click "Choose OS" and select "Other general-purpose OS", "Ubuntu" then "Ubuntu Server 24.04.3 LTS"
  5. Select the Micro-SD card for storage and click "Next"
  6. When prompted, select the option for "OS Customisation"
  7. Set a non-root username eg demo and password eg demo

Important

The username must be something other than root or else you will face login issues.

  1. Optionally, set your wireless LAN information with your Wi-Fi SSID and password.
  2. On the "Services" tab, enable SSH and "Use password authentication"
  3. Accept the warning prompts and flash the image.
  4. After the flash is complete, insert the Micro-SD card into the Micro-SD card slot on the board.

5. Device Setup

  1. After plugin in your Raspberry Pi, you should see a login prompt on your monitor. Enter the username and then the password that you created before the image flashing.
  2. Execute the command ip a to get the network connection info. Note the IP address listed under the eth0 interface.

Note

If you only have one keyboard between your Raspberry Pi and your host PC, to avoid having to repeatedly connect and disconnect it you can just connect to the Raspberry Pi via SSH from your host PC using the eth0 IP address with the command ssh username@x.x.x.x where username is the username you created for your Raspberry Pi and x.x.x.xis the eth0` IP address.

  1. Run these commands on your Raspberry Pi to update the core board packages and install necessary /IOTCONNECT packages:
sudo apt-get update
python3 -m pip install iotconnect-sdk-lite requests --break-system-packages
  1. Run this command to create and move into a directory for your demo files:
sudo mkdir -p /opt/demo && cd /opt/demo
  1. Run this command to ensure your user has ownership of the new directory (use your created username for username)
sudo chown -R username:username /opt/demo

For example if your username was TestUser your command would be

sudo chown -R TestUser:TestUser /opt/demo

Tip

To gain access to "copy" and "paste" functions inside of a PuTTY terminal window, you can CTRL+RIGHTCLICK within the window to utilize a dropdown menu with these commands. This is very helpful for copying/pasting between your browser and the terminal.

6. Onboard Device

The next step is to onboard your device into /IOTCONNECT. This will be done via the online /IOTCONNECT user interface.

Follow this guide to walk you through the process.

7. Using the Demo

Run the basic demo with this command:

python3 app.py

Note

Always make sure you are in the /opt/demo directory before running the demo. You can move to this directory with the command: cd /opt/demo

View the random-integer telemetry data under the "Live Data" tab for your device on /IOTCONNECT.

8. Resources