▲ 30 r/arduino
Controlling LEDs using Minecraft!
I made a Java mod that, whenever a button or lever was activated, searched the nearby blocks for a sign, extracted the text from it, and printed it into a .txt file.
Then, I made a Python script that, in real time, grabbed the latest line from that txt file and sent it to the Arduino’s serial monitor. Using a bunch of if statements, the Arduino decided which LED should turn on!
Later, some professors told me I could’ve used Java’s ServerSocket instead of using Python as a middleman, but I didn’t know about it at the time. Honestly though, doing it my way was way more fun! :D
u/jotaaltda — 9 hours ago