Radio IoT project with Cayenne. In this video, we will take a look at the current dashboard and implement a project with an activator and control it via the internet. We can continue from where we left in the last video. We are now in the dashboard Overview tab of the kn platform. Here, you'll see graphical elements called widgets that are related to your project. By default, when you create a project, there will be these widgets present already one measure and shows the CPU usage of the pie in percentage.
The next widget shows the RAM usage. The next one shows the storage space usage. This widget shows the network speeds and this one shows the temperature of your CPU. These two widgets are input widgets that can be clicked to reboot your PI or to shut down down the pipe, you can move and rearrange all the widgets however you want. You can also resize the size of the widgets. A quick overview of all the widgets shows as a list on the drop down menu here.
Remember that a project can have more than one device. Thus, we can set up a different dashboard for different devices. The drop down menu on the left will help you to keep track of devices and their widgets more easily if your project has many devices. Just on the side of the dashboard Overview tab, you can see another icon called GPIO. Clicking it reveals all the GPIO pins on the Raspberry Pi. It has been neatly arranged, mirroring the exact pin positions as on the Raspberry Pi.
Moreover, the pin icons are color coded to differentiate between GPIO power and ground pins easily. You can use this GPIO tab to configure the mode or the state of the GPIO pins used in your project. Now, you can see a gear icon on the left end of the dashboard. Clicking it reveals two options. One is to configure the device and the other is to reset the dashboard. Clicking the Configure option will take you to device configuration where you see all the details of the pie, like device name, version, model, OS version and name.
It also has an option to remove the device from the cane dashboard. In the left pane, you can see buttons to enable SPI ITC you are in one way interface. Keep this in mind if you are going to work with these. Now, click the Add New drop down menu which reveals four options. The first option named device or widget is used to add any new devices, boats, sensors, actuators, extensions, Laura modules, or even custom widgets to your project. This is the most important tab in the K in dashboard.
It is here where the magic happens. Hundreds of modules are supported out of the box with a drag and drop interface. The event tab is used to schedule an event to occur and the trigger tab is used to trigger a specific response when a predefined event happens. Please visit the links in the resources to know more about working with events and triggers in cane. Now let's make our simple IoT project. For this project, we will use an LED so that we can control it using the Raspberry Pi as a light switch directly from the dashboard through the internet.
First, fix a red LED on the breadboard like shown here. Then fix the current limiting resistor as shown in the circuit diagram and wire up one red LED wire the resistor to GPIO 17 pin of the pie. The other leg of the LED is connected to the ground pin of the pie. The next step is to add the activator widget called a light switch in the online dashboard. From the online dashboard, locate the add new menu and select the device and widget entry. On the Add Device screen, you will see categories containing various sensors and devices that can be added.
The LED that we want to add is located in the activators category. Since we want to add an LED look at the light tile and click on it to continue from this list Select the lights which widget. Now you need to enter the settings for the new widget before adding it to the dashboard. First, enter a name for your widget. Then select the device you want to attach this widget to then set the connectivity as integrated GPIO as our LED is connected directly to the Raspberry Pi headers. Next, set the channel as 17 as we have wired the LED to GPIO 17.
Then select the widget type an icon and finally, make sure the invert logic option is unchecked. As we want the LED to start at off state. And when the dashboard button is clicked, it should turn on. Click Add activated to complete adding your widget. You will then be returned to the dashboard where you will see your new button added. Now that our LED widget has been configured added to the dashboard, we can use it to control our light.
Click on the tile for the button to turn the light on. You can see that indeed, the LED has been turned on. Now click the button again to turn off the led the button icon updates to indicate the state of the LED. We have just scratched the surface of what is capable with the cane platform. Please go through the links in the resources section. To learn more about interfacing the sensors and actuators covered in the fifth section in K In summary, In this video, we have covered the following topics.
The K in dashboard, simple IoT project using K and section summary. In the section we have covered the following introduction to wireless communication in Raspberry Pi for remote GPIO control with Bluetooth, Introduction to the K in cloud Form IoT project with kn. gos summary. In this course, we cover the following topics getting started with the Raspberry Pi for setting up the software, Linux fundamentals, Python programming, physical computing with a Raspberry Pi for wireless communication in the Raspberry Pi four. And with that, we come to the very end of this course. And see you in our next course.
At macadamia you the student always comes first. We are investments to serve you. Good luck.