Okay so this all started because my buddy Dave kept bugging me about getting his stupid Raspberry Pi server to talk to his old NAS box. The thing kept crashing when you tried moving files around and he kept whining “Why can’t they just work together man?” Honestly, Dave is annoying, but he had a point. It should just work. So I figured, screw it, I’ll try getting two of my own random gadgets chatting – my dusty Arduino kit and that WiFi router I flashed last year. That’s what became “united ko”. Kinda dumb name, but whatever.
The Stupid Beginning
First thing I did was drag both boxes outta the closet. Man, they were dusty. Blew on ’em like an old Nintendo cartridge. Plugged the Arduino into my laptop with that crusty USB cable – you know the one chewed by the dog? Yeah, that one. Flashed the most basic “hello world” blink code just to see if it still breathed. Light blinked. Good. Still alive.
Then came the router:
That thing was already running some weird custom firmware I put on ages ago. Couldn’t even remember the login. Had to reset the damn thing – held a pin in the hole for like ten minutes praying it’d flash. Finally got back in. Felt like breaking into my own house.
Hooked up the Arduino: Took an Ethernet shield I found buried under Lego pieces. Slapped it onto the Arduino. Plugged an ethernet cable from the shield into one of the router’s LAN ports. The router LED blinked. Promising sign. Or maybe it was just yelling at me.
Code vomit: Started trying to send a simple message from the Arduino to the router. Basic like “HEY ROUTER!” Wrote some C++ garbage. Compiled. Errors. Always errors. Fixed typos. More errors. Compiler basically calling me an idiot. Coffee happened here. Lots of coffee.
First “success”?: After maybe an hour? Finally uploaded the sketch. Arduino lit up. Ran over to check the router’s logs via SSH. Scrolled… scrolled… nothing. Nada. Zilch. The Arduino was shouting into the void. Checked cables. Wiggled ’em. Still nothing. Wanted to kick something.
The Lightbulb Moment (Kinda)
Right. So maybe just screaming “HEY” isn’t obvious. Maybe the router is ignoring it like junk mail. Decided to try sending just a single number. Like 42. Obvious reasons. Duh. Tweaked the code real quick – literally just made it spit out “42” over the network every few seconds. Compiled again. Uploaded.
Jumped back to the router terminal tailing the system log:
tail -f /var/log/messages
Scrolled… waited… Held my breath… Suddenly:
[Timestamp] kernel: Some weird byte garbage! X%@!
[Timestamp] kernel: Ah crap, not this again...
[Timestamp] kernel: 42
HOLY CRAP. It saw the ’42’! Sitting right there in the router log! It was messy like hell around it, like the router was choking, but it freaking saw it! The Arduino yelled “42” and the router heard it, burped, and kinda acknowledged it!
Making It Actually Useful (Mostly)
Okay, proof of concept worked. Now what? Dave wanted file transfers? Fine. But way too ambitious for my leftover pizza brain right then. Started small. Made the Arduino read the value from a light sensor taped crookedly to it. Just sent the number value constantly to the router.
Router’s job:
Made a tiny script on the router using cron. Every minute, peek at the latest log, scrape that number from the Arduino’s message (ignoring all the garbage), and if the light level dropped below some number I picked arbitrarily? Blink the darn WiFi LED.
It worked! Sorta! I waved my hand over the sensor taped to the Arduino – saw the light value drop in the Arduino IDE monitor. Minute later? Poof! The router’s little blue WiFi LED flickered off then back on. Meaning the low-light event triggered the router!
Was it pretty? Absolutely not. Was it efficient? Nope, log scraping is dumb. Did those two things kind of, sorta, work together? Heck yes. My Arduino could kinda-sorta tell my router to do things. United KO. TKO by sheer stubbornness.
Disclaimer: All content on this site is submitted by users. If you believe any content infringes upon your rights, please contact us for removal.
So I finally decided to pull the trigger on a Germain watch. I’ve been eyeing them for ages, you know, just scrolling through pictures and dreaming. But this time, I told myself, it’s for real. I’m gonna figure out how...
So I kept hearing people talk about this thing called “cup6” in some online groups. Honestly, I had no clue what it was. Was it a new app? Some kind of tool? I figured the only way to really understand...
That Awkward Coin Hunt Begins So yeah, wanted one of those fancy 2 Euro coins with Grace Kelly on it. Saw a picture online, looked classy, thought “Why not?” Hit up Google right away, obviously. Typed in something like “buy...
Okay so yesterday I got obsessed with predicting this Benfica vs Atletico Madrid Champions League game. Like, seriously sat down at my messy kitchen table, coffee cold, and thought “Right, how do you even guess this one?”. Step 1: Diving...