Category Archives: Uncategorized

MQTT Display

I had been fooling around cheap ESP8266 based modules. Running HTTP server to do the network end of module. It never felt right because it felt too heavy and clunky, the web server, often having trouble with concurrent connections. However the combination of Node-Red and MQTT really looks promising – learned it from Peter Scargill’s blog. I used tuanpt/esp_mqtt and a Max 7219 based dot matrix driver on arduino to build an MQTT display. So it subscribes to topic like /leddisp1/show and various kinds of messages (though I had originally meant for it to show caller-id info for my wired phone).

The board itself is a kludge and you’d find lot of connectors left open for experimentation. The ESP8266 module communicates with the Arduino Pro Mini clone (5V, 16 Mhz) via SPI with ESP acting as master (and does the clocking). You can see really ugly diode based level shifting, which did work on bread board prototype but broke on the PCB I made. The dot-matrix I’ve got display is a set of 6 daisy chained Max7219 based 8×8 single color displays.

esp_mqtt_schematic

Schematic (Click)

The display would show stuff you publish as payload on the topic /leddisp1/show Also the payload has a format like <m>,<n>,<message> where m is the number of seconds the display should be showing the message, n is an option telling the display to scroll (when its value is “1”) and not to scroll (when its value is “0”). So you can do something like the following on Linux:

bash$ mosquitto_pub -h MQTT-broker-hostname -p MQTT-port \
-m "5,1,Kake is a lie" -t /leddisp1/show

In my setup Node-Red and MQTT broker (mosquitto) run on a Raspberry-Pi, which felt just right. Although Node-Red is not really necessary it lets you wire the display up in crazy ways. For instance, couple of clicks and I had a the display showing current time.

LED Display flow for Node-Red.

LED Display flow for Node-Red.

My ‘test’ flow is shown in the picture above. I’ve marked some ‘sub-flows’ like ‘serializing’ a JSON payload to the display’s message format (mentioned above) marked in green. There is a pretty MQTT topic which accepts JSON payload. There is an HTTP element which you can use to display stuff by making a request like, say:

http://noderedhost:1880/dispshow?text=Aaappi&option=1

Since the picture itself does tell you whats inside the elements, I’ve pasted the flow aniline/led_display_flow.json

References, code and stuff.

MSNE4K Fail.

I had bought two of those the Microsoft NaturalĀ® Ergonomic 4000 keyboards. The (newer) one at home has started failing. I’m guessing its part from all the button mashing games. The problem presented as spurious ‘x’ (like around 50 of them) coming in when the OS/Bios initialized the keyboard and then no more ‘x’, even when you type.

MSNE4K internals

MSNE4K internals

First time it occured, I shook it, vacuumed it and it started working. Second time it happened I opened it up I found snack fragments mostly from Lays. Cleaned it up and it started functioning normally. Today its messed up the third time and after an hour of moving the membrane around (or rather praying and hoping it works) its working.

In case you have one of these and want to dissassemble here is the thing: After all the screws on the bottom are removed, pull out the soft wrist padding pieces. Then you’d find two more screws to be removed. Then pry the space bar out (carefully) to find the two final smaller screws.

I thought they would not screw hardware up and wished it was more durable.

Madness is real.

I took the leap of faith, bought i7 930 based rig with insanely expensive motherboard (ASUS P6T Deluxe v2). Linux is up with my old installation with the following changes to kernel:

  • Add Yukon etherenet support (sky2.ko module).
  • Add w83627ehf module for sensors.
  • AHCI for disks (Which borked the windows 7 install; fixable by enabling ahci in windows registry)
  • And ofcourse SMP (incase you did not have it).
  • Proprietary nvidia drivers for the video card.

Funny my DRAM speed went down to 1066 Mhz (from 1333) cant recollect why. Now I’ve ‘set’ it to 1333.

Easier splines.

Finally shapes that use splines appear easy to create. Now tools includning blender and inkscape (first one, I tried after a long gap) have all the controls for manipulating control points and segments of bezier splines.

Hcoop logo concpet shortlist :

  • Globe/Earth (internet) : With orbits (The way one of the original logo suggestions had)
  • RJ45 connector (network)
  • Quadrilaterals and monitors (web pages)
  • PCB lands (electronics).
  • Servers ! (Thats a handful to put in a logo).