DigiSpark helps monitoring a log file

At work there was a problem with a tool that archives documents. Whenever that tool failed doing its task it would write an error code into a database table.
So some unfortunate user had to check that table for that error code about three times a day, would open that document in Word, save it and update the error code.

I got the order to write a program to automate the whole process. I used c#/.NET for the whole thing. The Task Scheduler would call this program every five minutes and would write its findings into a log.

Because I tested it I was pretty confident it would work smoothly. But what happened now was this: I would check the log regularly if my program picked up the wrong documents and corrected it. Instead of somebody checking the database for errors I would now check the log for the error indications!

So I wrote a second program – again in c#. It would check the log file and if it detected that the tool picked up and fixed a defect document it would then blink the DigiSpark‘s RGB led and turn from green to red. For this I used DigiStump’s DigiRgb.exe basically the same way I used it in my Minecraft mod.

I love it: It saves me a big amount of time of checking a log for something that hardly ever happens. Plus: It looks really cool on my desk 🙂

DigiSpark with RGB shield

DigiSpark indicating that all is good. If it detects an error log it blinks red ten times and then stays red until manually reset.

 

Hacking Minecraft, adding output using Arduino

With the future/career day coming up I was wrecking my brains on what to do on the day my son visits me at my workplace. There will be stuff organized for him in the morning but I will have to entertain him for about four hours in the afternoon.

I was thinking I would bring my laptop and let him do some Scratch programming, something he already did and enjoyed. Thinking further I thought I could bring my Arduino Uno and he could blink some LEDs. The most important thing for me is to bring him into programming and not to bore him so I searched further. I thought connecting Arduino and programming to something he is really into… like Minecraft!

I came across this blog post where Rozz decompiles, hacks and recompiles Minecraft to output the health status via a connected Arduino! DONE! This project had all the ingredients I was looking for!

Continue reading