Skip to content

Commit 1775e40

Browse files
authored
python/gpio-basic/Update README.md
Arduino Cloud CLI dashboard cloning
1 parent c64f11c commit 1775e40

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

python/gpio-basic/README.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Raspberry PI GPIO Basic control with Python using Arduino Cloud
22

3-
This project shows how to interact with the Raspberry Pi GPIOs from a dashboard created using Arduino Cloud. It can serve as an example to create your own applications that require access to RPI GPIOs and that can be ultimately controlled using a dashboard.
3+
This project shows how to interact with the Raspberry Pi GPIOs from a dashboard created using Arduino Cloud with an application programmed in Python. It can serve as an example to create your own applications that require access to RPI GPIOs and that can be ultimately controlled using a dashboard.
44

55
## The setup
66

@@ -142,6 +142,32 @@ Enjoy!
142142

143143
The platform allows for easy management and monitoring of connected devices through customizable dashboards, which provide real-time visualisations of the device's data. The dashboards can be accessed remotely through the mobile app Arduino IoT Cloud Remote, which is available for both Android and iOS devices, allowing users to manage their devices from anywhere.
144144

145+
#### Clone the dashboard using Cloud CLI
146+
147+
As described in the tutorial, you can create the dashboard on your own, but here I will show you a very handy trick so that you can just make a copy of a template that I have created. For that, you need to use [Arduino Cloud CLI](https://docs.arduino.cc/arduino-cloud/arduino-cloud-cli/getting-started/).
148+
149+
The steps are the following:
150+
1. Download and extract the latest release.
151+
Download it from [here](https://github.com/arduino/arduino-cloud-cli/releases)
152+
Make sure it is in your machine's PATH, so that it can be used globally.
153+
After installation, check that it is working by opening a terminal, and type:
154+
155+
2. Set your credentials
156+
To authenticate with the Arduino Cloud, we will need to first set our credentials, using our clientId and clientSecret which are obtained from the Arduino Cloud [API keys section](https://app.arduino.cc/api-keys). Run the following command and introduce the credentials:
157+
```
158+
arduino-cloud-cli credentials init
159+
```
160+
161+
3. Create the dashboard
162+
163+
```
164+
arduino-cloud-cli dashboard create \
165+
--name <Your-Dashboard_Name> \
166+
--template rpi-gpio-basic-dashboard.yaml \
167+
--override Raspberry-Basic-GPIO=<Your-Thing-ID>
168+
```
169+
Replace *<Your-Dashboard-Name>* and *<Your-Thing-ID>* with your actual data.
170+
145171
### GPIOs and Raspberry Pi
146172
There are many GPIO libraries that can be used with Raspberry Pis. Among some of the most popular, we can find: gpiozero, gpiod, RPi.GPIO. One of the issues that I found is that some of the libraries only work for certain versions of RPI. For instance, the new RPI 5, has a brand new chipset for managing GPIOs, and not all the libraries work for it.
147173

0 commit comments

Comments
 (0)