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
- UI: click UI that requires no coding
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
- Create your final action outcome with AND by choosing one or more actuators, in this case GPIO
- Write 0 on GPIO17 to turn off the LED connected
- Write 1 on GPIO27 to turn on the LED connected
For more detail: GPIO for Raspberry Pi B, B+, Pi 2 running PROTA Pi OS (HTML5)