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

Nikon Intervalometer with a Digispark

Years ago I bought myself an IR remote for my Nikon D40. That worked ok, but of course I wanted to build my own using a Digispark.

There’s lots of tutorials for IR remotes out there, like LuckyLarry’s. I then later came across the nikonIrControl library which basically allows you to trigger a photo with a single line of code! Best of it is this library will work for every camera supported by ML-L1 and ML-L3 such as D40, D40X, D50, D60, D70, D70s, D80, D90, D7000, D5000, D5100, D3000, Coolpix 8400, 8800, P6000, P7000, P7100, Nikon 1 J1/V1.

And because the intervalometer should be as tiny as possible I was using a Digispark to control everything.
Continue reading

Spycam with Arduino / Digispark

This is my first real project with the Digispark.

My son made a bird feeder at school and every now and then we could spot a bird eating on our balcony. I thought that would be cool to make photos of the birds stopping by.

Somehow we would have to detect when something comes/flies by. This is done using the PIR motion sensor. But apart from that, Digispark should also trigger after a defined interval, like making a foto every 5 minutes for some nice time lapse movies. I actually added a 1k potentiometer with which we can adjust the delay between two photos between 30 secs and 10 minutes. Setting the poti value in the middle Digispark would trigger a photo every 5 mins.

I bought myself a spycam on ebay:

spycam

Features:
Image Resolution: 1280 x 960 pixel
Color Video Resolution: 640 x 480 pixel
FPS: 29 frames per second
Image file format: JPEG
Video file format: AVI
Color Video and Audio
Rechargeable Li-ion battery: 280mA 3.7V
Dimension: 5.0 x 3.0 x 1.2 cm

Continue reading