Introduction: GPIO for Raspberry Pi B, B+, Pi 2 Running PROTA Pi OS (HTML5)
Some of us believe greater can be fulfilled when technology upbuilds and completes the great, prior products of our efforts. It’s the basic fundamentals how all of us evolved. GPIO I’ve experienced is in a way a shortcut that trims down to the simple core functions it was originally meant to do. I can build and crumble, almost like Legos, however I want and how often I want. Don’t get me wrong. I still appreciate the freedom of coding, but I’d prefer not to start from scratch every time. This’s clearly an interesting approach I’ve never seen elsewhere.
NOTE for your understanding
You need to download the app first on PROTA Pi to follow this Instructables. Install the app from AppRepo. By any chance, if you don’t have a copy of the OS, you can get your hands on it from the download. if you’re looking for a shortcut, this’s the one: Where-can-I-download link.
Step 1: Download the App: GPIO
Install the latest version of the app from AppRepo.
- Change interface mode
- Set specific 'pin'
- Input : 'Read' value
- Ouput : 'Write' input value
- Serial communication : UART, SPI, I2C
- PWM : 'Write' input value
- Edge_Rising / Edge_Falling : detect edge status
Step 2: Setup and Test the App
Check out a short clip.
- Choose your UI horizontal or vertical, the one you favor
- Setup to read or write values for Input or Output like when operating a power of LED
- Choose Interrupt to react to certain events like when pushing or releasing a button
- Write PWM values like when operating servos
Step 3: Create Automation Rules
Creating rules is like building a logical programming by yourself. The only difference is that it requires no direct coding. This programmable Lego is a serious toy powerful enough like any program is capable of, even more so now that it supports direct Python scripts.
Create a rule for yourself
- Create your IF condition by choosing a sensor, in this case maybe Webcam
- Select the condition when or by which sensor it would be triggered
- Select the specific data condition like when Edge rises on motion detection
- Write 0 on GPIO17 to turn off the LED connected
- Write 1 on GPIO27 to turn on the LED connected
Step 4: Outcome
Automation rule programming & more apps
If everything has gone well, all rules you’ve created will show up on History, the timeline of all executions from your device. It’s like a place to check all your logs in one place in a more easy-to-understand manners. Like automation rules executed in the picture, GPIO is just one of the apps that makes a great use. I recommend you create rules with more diverse apps, the blocks of program that can be inter-programmed and automated.
We have a be nice policy.
Please be positive and constructive.