Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
Get a devDuck
Rubber duck debugging has never been so cute! Get your favorite coding language devDuckBuy Now
Search - "gpio"
It finally hit me the other day.
I'm working on an IoT project for a late-stage ALS patient. The setup is that he has a tablet he controls with his eye movements, and he wants to be able to control furnishings in his room without relying on anyone else.
I set up a socket connection between his tablet and the Raspberry Pi. From there it was a simple matter of using GPIO to turn a lamp or fan on or off. I did the whole thing in C, even the socket programming on the Pi.
As I was finishing up the main control of the program on the Pi I realized that I need to be more certain of this than anything I've ever done before.
If something breaks, the client may be forced to go days without being able to turn his room light on, or his fan off.
Understand he is totally trapped in his own body so it's not like he can simply turn the fan off. The nursing staff are not particularly helpful and his wife is tied up a lot with work and their two small children so she can't spend all day every day doting on him.
Think of how annoying it is when you're trying to sleep and someone turns the light on in your room; now imagine you can't turn it off yourself, and it would take you about twenty minutes to tell someone to turn it off -- that is once you get their attention, again without being able to move any part of your body except your eyes.
As programmers and devs, it's a skill to do thorough testing and iron-out all the bugs. It is an entirely different experience when your client will be depending on what you're doing to drastically improve his quality of life, by being able to control his comfort level directly without relying on others -- that is, to do the simplest of tasks that we all take for granted.
Giving this man some independence back to his life is a huge honor; however, it carries the burden of knowing that I need to be damned confident in what I am doing, and that I have designed the system to recover from any catastrophe as quickly as possible.
In case you were wondering how I did it all: The Pi launches a wrapper for the socket connection on boot.
The wrapper launches the actual socket connection in a child process, then waits for it to exit. When the socket connection exits, the wrapper analyzes the cause for the exit.
If the socket connection exited safely -- by passing a special command from the tablet to the Pi -- then the wrapper exits the main function, which allows updating the Pi. If the socket connection exited unexpectedly, then the Pi reboots automatically -- which is the fastest way to return functionality and to safeguard against any resource leaks.
The socket program itself launches its own child process, which is an executable on the Pi. The data sent by the tablet is the name of the executable on the Pi. This allows a dynamic number of programs that can be controlled from the tablet, without having to reprogram the Pi, except for loding the executable onto it. If this child of the socket program fails, it will not disrupt its parent process, which is the socket program itself.13
Bought a Raspberry pi with intentions of making a kickass hacking module. Ended up blinking the LED lights from GPIO pins. How's your life?11
CPI, coffee programming interface. Pretty much my boss wired a Pi0 to his coffee pot somehow and uses the GPIO pins to detect when the pot is done brewing and stops heating the top, then it sends a message to him on Slack.9
*desolders Ethernet, USB and GPIO rails from Raspberry Pi to decrease height*
(Desoldering that shit from a Pi fucking sucks btw, no idea what solder or pads they use but it's garbage)
*boots up Raspbian to see whether it still works and to set things up*
Oh shit.. I need keyboard and mouse for this :') fuck me I guess... Long live planning ahead. Does there exist a KVM over TCP/IP yet? 😅21
Me, hacking the sunxi kernel to access gpio on my orange pi:
My friend: "oh, a raspberry, are you using python for that?"
Me, looking up from opcode dump: "you can use python for this?"3
This is probably dumb, but I felt genuinely let down when there were no options for facial hair for my female avatar.
I actually waited for a moment, thinking maybe it was just taking a minute to load, but then it hit me :'(5
Coders get yourself a electronics friend and electronic heads get yourself a coder.
I got a friend who studies engineering and really loves it and i do software development with a passion.
And we both love to chill with some drinks every now and then.
The result: We're currently creating a thing which fills you drinks via a button press on your phone.😁
Optional paypal payment for every drink for use at parties of course.(;4
So our new hardware guy who is being managed by our lead embedded developer had the task of designing me an expansion board for my Linux board. The Linux board uses the 40 pin expansion like the raspberry, bananna and orange pi family and as you all know there are many different types of expansion boards for this.
I said at the start come to me and tell me what you want to connect to before deciding which pin you connect to so it is less work for me with Linux board configs and drivers.............
No no no we will sort it all... erm.....
So today they come ask me if they can use an SPI port for GPIO and I am like erm... why there is plenty of GPIO...
It turns out they have been designing the board based on the pin outs of an expansion board and not the actual connector of the Linux board.. I mean seriously WTF!1
So I was changing some CSS, but the changes weren't showing.
Was it being cached? Nope
Was the selector wrong? Nope
Well it was the right file yeah? Yup
So after like 10min of scratching my head, restarting the server, etc it turns out I was checking prod instead of dev.
This isn't even the first time this has happened 😑
Guys just remember to keep your dev tab and your prod tab away from each other, like way away.8
Code your own damn stuff!
I am building a RFID and button controlled music player for kids.
I am using a couple of different modules for that. The one for the input was really laggy. I thought it was so laggy because of the network delay. I tinkered with it a week but it didn't improved. So I just coded my own module which was much easier to do than I thought.
It was a really rewarding to code something yourself in less than a day instead of trying to get something working for a week.
So I'm taking embedded systems subject in my masters course. They have mixed this subject's content with electrical engineering and I'm a computer science graduate. Everything was perfect until I reached to GPIO board.
Wtf is this shit?
Why it has so many holes and what are they for?
What I'm supposed to do with it?
What is ground? Transistor?
Why I'm connecting to two pins only instead of the 4 pins of a button?
Thanks to pi4j i think i will pass the subject!2
I hate it when you actually buy a template and it turns out things only align when your images and text are a certain length.
Dear designer no, my images are not all 200 x 200. Screw you :)4
Today I made some lights turn on and off with Gpio on my Rpi and some php, really happy and I'm going to work on it cause the landing site is really ugly. Would it be appropriate to add "mechanical engineer" and additional to web developer to my resume now? 😂😂1
We're looking to change the domain provider we use to register new client's domains to one that has an API.
So far it looks like it'll either be namecheap or AWS's Route 53.
We're also looking for the same thing with mail inboxes.
Do you have any recommendations / experience with either of these?
I was hoping to find a solution that would provide both the domain registration and the mailboxes with no hosting and accessible via API but I've had no such luck.
(Except for maybe two, but neither looked up to date)10
Does anyone know a single-board computer like e.g. the raspberry pi that features a physical on-board audio input as well as an output?
I know that GPIO-header-boards like e.g. the hifiberry or WolframAudio (which seems somewhat deprecated by now) exist. I could probably also alternate to an USB-soundcard, but I'm curious whether someone might know a more compact solution.5
I told you guys that I would update you on my PiBM-5150 project. I figured out the hard way that my USB to DB-25 cable wouldn't cut it. Seems it is for printers and no matter how hard I tried it wouldn't work because of the path of the wires. After researching, it is apparent that the GPIO pins on the pi are configured for serial by default but it requires a little voltage change from TTY to RS-232. Rather than do like one of the videos I saw and solder junk to a bread board, I found a serial (rs-232) shield and 9pin output for the pi. Now, both computers are true rs-232 each. Instead of using a modem between them, I bought a null modem cable (crossover of Tx Rx signals) to interface the two machines directly. I'll update this evening to show it hopefully working.
I was having fun with GPIO recently. Now I have an RGB LED flashing in my room when my alarm clock starts ringing.
Android App sending HTTP Request when Alarm has been triggered, php starts a bash script (was too lazy to do it in php). Bash script does its job for 10 seconds.
There was a small exhibition in our school. I made a retropie arcade with the ability to play them physically with gpio.
Another one streamed video from a android phone over wifi.
He won the competition.4
FUCK MY LIFE WHY CANT A RASPI BOOT FROM USB??! I'VE BEEN WORKING ON A PROJECT FOR IT FOR THE LAST WEEK, SPENT NIGHTS LEARNING ELECTRONIC BASICS AND GUESS WHAT? THAT FUCKING RASPIAN ON MY MICRO SD CARD IS NOT BOOTING. AND I CANT REINSTALL IT BECAUSE I HAVENT GOT AN FUCKING ADAPTER FOR THIS SHIT. I HAVENT BEEN USING A MICRO SD FOR YEARS.
AND NOW I CANT TEST MY PROGRAM BECAUSE I NEED THE RASPIS GPIO PINS :(7
Im thinking about getting a raspberry pi 3 or an odroid-c2.
(Specs at the end)
Its to host a simple php server and maybe a gitlab server, both for personal use.
Should I go with the better performance or the better community support?
System-on-chip used : Amlogic S905
CPU: 1.5 GHz 64-bit quad-core ARM Cortex-A53
Memory: 2 GB LPDDR3 RAM at 912 MHz
Storage: MicroSDHC slot, eMMC module socket
Graphics: Mali-450 MP3
Connectivity: 4× USB 2.0, micro-USB OTG, HDMI 2.0, Gigabit Ethernet (8P8C), Infrared, 40× GPIO ports
SoC: Broadcom BCM2837
CPU: 4× ARM Cortex-A53, 1.2GHz
GPU: Broadcom VideoCore IV
RAM: 1GB LPDDR2 (900 MHz)
Networking: 10/100 Ethernet, 2.4GHz 802.11n wireless
Bluetooth: Bluetooth 4.1 Classic, Bluetooth Low Energy
GPIO: 40-pin header, populated
Ports: HDMI, 3.5mm analogue audio-video jack, 4× USB 2.0, Ethernet, Camera Serial Interface (CSI), Display Serial Interface (DSI)10
I was doing stuff in my room, when I slipped on my hand and landed on my knees. I look up, and I see my Raspberry Pi's GPIO pins puncturing my hand.
Fast-forward couple of hours, I decided to post a picture of it (it wasn't bleeding or anything) on Twitter. 2 seconds pass, and my account got suspended.
I have 2 simcards: one for calls, one for unlimited data.
Twitter is trying to call me to verify the account, but I have my data phone number in the profile.
I am a young dev trying my hands around in different stuff.
So I would appreciate any criticism or comments that would allow me to Learn more :) or good practices I can follow.
Here is one project where I tried to create a structured frameworkish way to write mqtt processors.
Mqtt processors are standalone apps that process mqtt requests that has to be acted upon (like add sensor data to db sent from sensor node, read from db, turn some gpio on or off if the app is on some embedded device like raspi ) etc.
This project creates a structure where you can just focus on writing subscribed topic listeners in a clean neat way. (Hopefully)6
Rant! The reason. Software engineers have to take test just to get a job. Is cause there are to many hacks out there.
Me. Did you read the schematic did you see the gpio that enables the JTAG needs to be asserted to debug.
THING 1: What's JTAG debugging
THING 2: No just debug using the software.
Me: enable the JTAG or it won't work
Face palm I am so tired of helping people. We just hired who where supposedly real engineers
In every other profession there are standards. You don't see any self taught surgeons.13
Wasted 3 hrs on this today:
-Wanted to control pi gpio pins from php web server
-shell_exec(gpio write x x) wasnt working for me
-made a python script for gpio toggling which i wanted to execute with shell_exec
-still not working. Changed permissions, changed code , did everything possible SO MANY TIMES!
-Turns out if i had added a '-g' in the gpio write command..it would have worked in the first place!
Sophomore year starting soon so I'm looking for new project (s) to complete in parallel with the studies.
Some are more design-y and some more backend-y but I recently started getting better at designing so :)
1) Learn some fragment shader stuff. I've always been messing around with graphics and have a game on steam, so I think that's a good idea to be paired with signal processing.
2) Reactive web services. Preferably with spring-boot or vert.x but
3) I would also like to dive into golang (and make some reactive thing with it)
4) WebAssembly seems nice... But I got some concerns
5) exercise making wireframes -> CSS (with some js)
6) I've never really done any real backed work with nodejs, except serving and aot compiling js, or doing gulp tasks
7) Implementing a whole project, or a fraction of it as serverless on aws
* I'm definitely going to use a couple very simple services to make a docker swarm with load balancing, etc, just because I know how everything works but got no practical knowledge
8) Design an esports jersey for the university department I'm in (shouldn't take long)
So what do you guys think? Recommendations are welcome :)
P.S. last year in review:
> A webapp running on a raspberry pi powering a reflex testing game on gpio (java/spring-boot , codename: buttonmasher)
> small Elastic search cluster to monitor some random university servers through kibana dashboards
> laser tracking on wall of *any* colour and variable light conditions via a webcam (opencv) , controlling the mouse pointer, whether you run it against a projector or any wall
> Various random Photoshop stuff
Using Sudo to run a node script that interacts with GPIO pins on Ubuntu (Minnowboard). The permissions suck.