Raspberry Pi Getting Started Guide

From Flowcode Help
Revision as of 12:42, 13 July 2023 by MartinW (talk | contribs)
Jump to navigationJump to search

RPI Guide1.png

Raspberry Pi as a Flowcode target

RPI Guide2.png

Raspberry Pi is an inexpensive board level target with digital I/O but also internet functionality built in. As such it provides an ideal base for diverse applications including IoT (the Internet of Things). For the first time, Flowcode 8 enables users to target this hugely popular Raspberry Pi family of boards. Flowcode is an intuitive way to program, either at home, in the classroom or for industrial uses.

Alongside this, our E-blocks2 hardware platform also supports the Raspberry Pi and the Raspberry Pi Shield is perfect for those who wish to integrate their Pi into the E-blocks system.

Flowcode is chip independent and the Raspberry Pi is just one target of 33 different families of microcontroller that we support. Hence most projects can easily be ported from one target device to any other.

There are many advantages to creating Flowcode applications on Raspberry Pi, here are just a few:

• The huge library of Flowcode components can be used

• Remote download of the Flowcode generated applications via WiFi or Ethernet

• The Flowcode generated programs run on the Raspbian Linux operating system

• Flowcode generated applications can be called up from other programs

• Multiple Flowcode applications can be run simultaneously on the Raspberry Pi

• Debug message capability directly from the Raspberry Pi to a console window on the PC

• When used in conjunction with the Matrix hardware the Ghost features of Flowcode are available

Using Raspberry Pi with Flowcode 10

SD cards supplied with Matrix products are pre-programmed with the Raspbian image, in this case please go to the “Configuring Raspberry Pi for use with Flowcode” section.

Help can be found at https://www.raspberrypi.org/learning/software-guide/quickstart Creating a Raspberry Pi OS on a micro SDHC card

• Download& install the Raspberry Pi Imager from the Raspberry Pi website

• With the minimum size of 16gig SD card, connected to your PC via an SD and ignore/close any warnings about card not being formatted if they appear

• Run the R Raspberry Pi Imager:

RPI Guide3.png

• Left-click CHOOSE OS and select Raspberry Pi OS (32-bit)

• Left-click CHOOSE STORAGE and select the popup.

• With a 16GB SD micro card should look like:

RPI Guide4.png

• WRITE should now be available to select

Configuring Raspberry Pi for use with Flowcode

We will use WiFi and set up a Static IP address.

If you have not setup WiFi during the initial setup period, then left-click on the internet icon that is in between the speaker and Bluetooth icons to select your network

RPI Guide5a.png

After entering the SSID name and password a dynamic IP address will be automatically assigned and the WiFi icon will be solid.

We will set up the WiFi with our own static IP address.

I would recommend running software like WNetWatcher and finding an IP address that's not in use.

For me it is 192.168.0.25.

The 192.168.0 will remain the same, it's the last set that will be different for different devices connected to your network.

Right-click on the internet icon and select Wireless & Wired Network Settings

RPI Guide5.png

Within Configure: Select wlan0 and enter the new static address withtin IPv4 Address

RPI Guide6.png

After applying and closing, then rebooting the Raspberry pi, the signal strength within the WiFi icon will be continuously changing, this is normal.

You can check IP is correct from software like WNetWatcher or opening a terminal and enter ifconfig.

Look for wlan0 and for the second line down:

RPI Guide6a.png

Flowcode uses secure shell, SSH, to transfer user applications to the Raspberry Pi.

SSH is easily enabled on the Raspberry Pi from the desktop.

Alternatively, this can be done by using raspi-config from the terminal.

RPI Guide7.png

From the Raspberry Pi menu, in the top left corner of the desktop, select “Raspberry Pi Configuration” from the “Preferences” menu.

In the “Interfaces” tab, mode the SSH slider to the right for enabled, and click OK.

RPI Guide8.png

With SSH remote access enabled, it is recommended that you to consider changing the default pi user password (the initial default is raspberry).

For wireless connections, click and set the “Set WiFi Country” in the “Localisation” tab.

RPI Guide9.png

Click the OK button and close the dialog