2013-07-26

LED RGB Strip with Web Interface

Project site

Current issue: As you can see in the video there is a small delay between clicking the button and changing the light. This only appears when using a mobile device, on my mac the delay disappears. Any hint is welcome.

2013-07-25

Wattuino - erste Schritte

Bei Watterott gibt es einen kleinen Arduino Clone: Wattuino. (Im Bild schon bestückt mit Stiftleisten.)


Für die Entwicklung/Programmierung mit der Arduino Umgebung wird noch ein Programmieradapter benötigt, z.B. FTDI-Breakout. Beim FTDI-Breakout handelt es sich um einen USB-Seriell Wandler, damit kann der Wattuino (fast) wie ein normaler Arduino in der IDE verwendet werden. Update: Ggf. muss noch ein FTDI Treiber installiert werden.


Die Verwendung in der Arduino Entwicklungsumgebung gestaltet sich mit der genannten Kombination denkbar einfach.
  • Board: Arduino Pro or Pro Mini
  • Serial Port: /dev/tty.usbserialA1017RLQ (Nummer kann ggf. variieren)


Und das war es auch schon. Die ersten Tests mit den Arduino Beispielen "Blink" und "ReadASCIIString" liefen bei mir dann auf Anhieb.




2013-07-05

LED Matrix - Part 2

Es hat mehr als 4 Jahre gedauert, bis die LED Matrix wieder zum Leben erweckt wurde (vgl. LED Matrix - Erste Versuche). Angestachelt durch weitere Versuche mit Kollegen, konnte ich die Matrix jetzt von Processing aus ansteuern.

Zum Aufbau

Der Code

Arduino/Avr-Net-Io Code

Processing Code

Ergebnis

2012-12-22

AVR NET-IO: Receive UDP packets

Some month ago I post an article about sending UDP - now it's time to write about receiving UDP.

Again my equipment is:
  • Pollin AVR NETIO Board
  • Arduino 1.0.3
  • avr-netino (Project)

Patch tcpip.cpp

To enable UDP receiving a patch of the tcpip.cpp file is needed. The patched file can be found here. You need to overwrite the original file libraries/EtherCard/tcpip.cpp with the patched one.

Arduino program

Arduino program to receive UDP packets:

Example script to send UDP

Here is a small example how to send UDP packets to avr-netio board:

2012-12-16

Stabiler Vogelhausständer

Die "dunklen" Jahreszeiten sind immer auch eine Zeit, in der ich verstärkt zum Heimwerken komme. Dieses Jahr wünschte sich meine Frau ein Vogelhaus und das brauchte natürlich auch einen entsprechenden Ständer.
Beim Vogelhausdesign habe ich mich an Anregungen aus dem Baumarkt orientiert - da mag jeder selber schauen. Fehlte noch der Ständer - der sollte entsprechend stabil sein und wegen der hiesigen Katzenpopulation eine gewisse Höhe haben.

Zum Aufbau:
  • Basismaterial: 4 Kantholz (54mm x 54mm) - in Summe ca. 4m Länge
  • daraus dann 
    • 6x Fuß bzw. Stabilisierungsstrebe (Länge ca 43cm)
    • 1x zentraler Pfosten (Länge nach Bedarf)
  • Für das Stabilisierungskreuz dann entsprechende Aussparungen einarbeiten.
  • Alles verschrauben und verkleben.

  • Schließlich noch das Holz imprägnieren.
Zeitaufwand (ohne Streichen): 2-3h

Jetzt müssen nur noch die Vögel kommen ...

2012-11-04

Infinitest with TestNG 6.8 support

Infinitest is an eclipse plugin which executes after editing files all corresponding unittests. After using infinitest for a while I realize that some features of TestNG 6.8 are not available by infinitest itself (in my case assertNotEquals). And therefor result in a reported problem.

Fortunately the project is availible on github and so I fork the project and change it to support TestNG 6.8. An pull request to the original project is waiting.

If you want to try it on your own risk - you can download it here. To install it in your Eclipse you have to unzip the file in the eclipse/dropins directory. I have test the version on Win7 and OSX with Eclipse 3.7 - and it seems to work ;-) 

2012-10-19

Unittest to verify that static method is called

.. using PowerMock, Mockito, TestNG

In example the class under test (cut) has a method showErrorMessage(msg). This method will call the static method JOptionPane.showMessageDialog(...) to show a error message.

I wrote a unittest to

  1. mock the showMessageDialog call - because otherwise the test will fail with an java.lang.VerifyError (UIManager is not initialized)
  2. verify that showMessageDialog is called + with the right parameter