Difference between revisions of "Led Matrix"
From Fixme.ch
Line 100: | Line 100: | ||
{ | { | ||
"action": "insert", | "action": "insert", | ||
− | "id": | + | "id":1, |
"text": "server1.domain.ch", | "text": "server1.domain.ch", | ||
"position_x": 10, | "position_x": 10, | ||
Line 106: | Line 106: | ||
"position_lenght": 78, | "position_lenght": 78, | ||
"scroll_speed": 255, | "scroll_speed": 255, | ||
+ | "scroll_index":0, | ||
"red": 3, | "red": 3, | ||
"green": 0, | "green": 0, | ||
"blue": 2 | "blue": 2 | ||
} | } | ||
+ | |||
+ | |||
+ | {"action": "insert","id":1,"text": "server1.domain.ch","position_x": 10,"position_y": 5,"position_lenght": 78,"scroll_speed": 255,"scroll_index":0,"red": 3,"green": 0,"blue": 2} | ||
+ | |||
+ | |||
</pre> | </pre> | ||
Revision as of 22:56, 16 October 2011
Contents
Goal
The goal of this project is to display Nagios Server's status on RGB Led Matrix.
I have 4 Led Matrix, the idea is to create one box per matrix with 230V connector and Data IN/OUT So we can decide if we want to use 1-4 Matrix
Data flow
- Nagios server get servers status and store data into MySQL Database with XXXX plugin
- Perl script on Alix (PC Engine) is getting data from MySQL and transmit data by JSON to mbed (by USB).
- mbed get json's data from Alix and display to Led Matrix
- Led matrix display Servers status :-)
Used componment
- 1 mbed NXP LPC1768 [1]
- 2 RGB Led Matix (64x32) for display Led_Matrix_32x64
- 1 ALix 2d13 for getting Nagios status and sending to MBED [2]
Hardware pieces listing (per matrix box)
Number | Description | Where to find | Unit Price | Link |
---|---|---|---|---|
1 | 5vdc 4A PSU | Ebay | $10.99 | http://tinyurl.com/3w465kh |
2 | IDC Socket 16POS | Digikey N°ASC16H-ND | $1.93 | http://tinyurl.com/3qxmgrp |
1 | CHASSIS ALUM 5 X 10 X 3 | Digikey N°377-1013-ND | $17.60 | http://tinyurl.com/3bho3n6 |
2 | CONN D-SUB PLUG 25POS GOLD | Digikey N°AMR25B-ND | $8.53 | http://tinyurl.com/64e5wj7 |
2 | D-SUB 25POS RECPT IDC GOLD | Digikey N°L17DBFRA25S-ND | $2.31 | http://tinyurl.com/6l54f7t |
1 | EMI FILTER 115/250VAC 4/6A | Digikey N°603-1132-ND | $26.65 * | http://tinyurl.com/42vvrxo |
1 | Led Matrix 16X32 RGB | China | $150.- | Led_Matrix_32x64 |
TOTAL | $230.- |
∗ Can be disassembled from Summit Extreme 48 Switch
Perl script on ALIX
This perl script is getting data form MySQL to send to mbed. It run every minutes by cron.
Requiert Perl modules
- blah
- blah
- blah
Source code
The source code is accessible from there
JSON data example
{ "action": "insert", "id":1, "text": "server1.domain.ch", "position_x": 10, "position_y": 5, "position_lenght": 78, "scroll_speed": 255, "scroll_index":0, "red": 3, "green": 0, "blue": 2 } {"action": "insert","id":1,"text": "server1.domain.ch","position_x": 10,"position_y": 5,"position_lenght": 78,"scroll_speed": 255,"scroll_index":0,"red": 3,"green": 0,"blue": 2}
Field | Value | Description |
---|---|---|
action | string: insert,delete,modify | used to insert,delete,modify data vector on mbed |
id | integer | id of data to modify,delete |
text | string | text to display |
position_x | integer | X position of text area |
position_y | integer | Y position of text area |
position_lenght | integer | lenght of text area |
scroll_speed | integer 0-255 | scrolling speed |
red | integer 0-4 | RGB value |
green | integer 0-4 | RGB value |
blue | integer 0-4 | RGB value |
Special Thanks
Special thank to FIXME members who helped me with programmation and electronic stuff. Specialy to :
- Simon for hadware design and mbed code improvement.
- Mathieu for discovering LED Matrix and explainition of how it work.
- Jean-Baptist,Raphael,Marc for there help with my newbies programmation questions.
- Florian for his help for leds PWM
Project Owner
- Fred
Todo List
- Make the perl script
- Make the box for LED matrix
- Make a PCB to connect Mbed
- Finish mbed code
Issues
- The mbed code need to be optimized for memory issues