I am looking for an arduino programmer who is familiar with the "freaklabs" Chibi wireless Arduino module.
I would like to attach the TX module to a computer via serial port and have the software send serial commands to the arduino TX module. The receiver module will receive these commands and output them in a lightbar display. The display is made of of 5 LED's. The LED's brightness needs to be able to be changed from 0-100% and also flash at adjustable frequencies. There are also two relays that switch AC current for spotlights and strobe.
Currently, I have 5 PWM IO ports open and 2 others for the relays. I wrote some basic code, but it sucks and doesn't work.
Please message me if you are interested and how you would like to be compensated for your time.
I am really trying to finish this project for my house, but I am just not great with code. I don't want to "hire", but I will def like to reward that person for his efforts.
Post your sketch (code). Please put your sketch between </mark>** **<mark>[code]</mark>** **<mark>
your stuff goes here </mark>** **<mark>[/code]</mark>** **<mark>
tags.
Ok so here is how the system works. There are two Chibi (freaklabs) wireless Arduino modules. The transmitter module is connected to my PC via USB cable. I send commands "a-z" from Terminal to the device. One the receiver side, there are 5 PWM outputs and 2 DO. The purpose of this device is to wireless send a signal to a light bar that contains a strobe light (AC), spotlight (AC), and 5 LED's that are dimmable in increments from 0-100% and also they can blink at a few different frequencies. I had the code working (minus the flashing leds) on a regular ardino and that was ok. I got a regular (button test) program to work on the Chibi modules, but I cannot get my code to work on the Chibis. Here is what I got:
//NVT LIGHT BAR
//7/28/2011 RR
#include <chibi.h>
#define DEST_ADDR 3 // the destination address data will be sent to
void setup() {
// init the wireless stack
chibiInit();
// initialize serial communication:
Serial.begin(57600);
// initialize the LED pins:
// send info to terminal
Serial.println("Enter LED you would like to manipulate. (a through p)");
Serial.println("Spotlights ON/OFF. (q & r)");
Serial.println("Strobelight ON/OFF. (s & t)");
Serial.println("All lights ON. (u)");
Serial.println("Any other key turns all OFF.");
for (int thisPin = 2; thisPin < 11; thisPin++) {
pinMode(thisPin, OUTPUT);
};
};
void loop() {
// read the sensor:
if (Serial.available() > 0) {
int inByte = Serial.read();
switch (inByte) {
case 'a':
analogWrite(5, 1);
analogWrite(3, 1);
Serial.println("WHITE LED'S LEVEL 1 SELECTED.");
break;
case 'b':
analogWrite(5, 25);
analogWrite(3, 25);
Serial.println("WHITE LED'S LEVEL 2 SELECTED.");
break;
case 'c':
analogWrite(5, 50);
analogWrite(3, 50);
Serial.println("WHITE LED'S LEVEL 3 SELECTED.");
break;
case 'd':
analogWrite(5, 200);
analogWrite(3, 200);
Serial.println("WHITE LED'S LEVEL 4 SELECTED.");
break;
case 'e':
analogWrite(6, 1);
Serial.println("RED LED LEVEL 1 SELECTED.");
break;
case 'f':
analogWrite(6, 25);
Serial.println("RED LED LEVEL 2 SELECTED.");
break;
case 'g':
analogWrite(6, 50);
Serial.println("RED LED LEVEL 3 SELECTED.");
break;
case 'h':
analogWrite(6, 200);
Serial.println("RED LED LEVEL 4 SELECTED.");
break;
case 'i':
analogWrite(9, 1);
Serial.println("GREEN LED LEVEL 1 SELECTED.");
break;
case 'j':
analogWrite(9, 25);
Serial.println("GREEN LED LEVEL 2 SELECTED.");
break;
case 'k':
analogWrite(9, 50);
Serial.println("GREEN LED LEVEL 3 SELECTED.");
break;
case 'l':
analogWrite(9, 200);
Serial.println("GREEN LED LEVEL 4 SELECTED.");
break;
case 'm':
analogWrite(10, 1);
Serial.println("BLUE LED LEVEL 1 SELECTED.");
break;
case 'n':
analogWrite(10, 25);
Serial.println("BLUE LED LEVEL 2 SELECTED.");
break;
case 'o':
analogWrite(10, 50);
Serial.println("BLUE LED LEVEL 3 SELECTED.");
break;
case 'p':
analogWrite(10, 200);
Serial.println("BLUE LED LEVEL 4 SELECTED.");
break;
case 'q':
digitalWrite(4, HIGH);
Serial.println("SPOTLIGHTS ON.");
break;
case 'r':
digitalWrite(4, LOW);
Serial.println("SPOTLIGHTS OFF.");
break;
case 's':
digitalWrite(2, HIGH);
Serial.println("STROBE LIGHT ON.");
break;
case 't':
digitalWrite(2, LOW);
Serial.println("STROBE LIGHT OFF.");
break;
case 'u':
Serial.println("ALL LIGHTS ON.");
for (int thisPin = 2; thisPin < 11; thisPin++) {
digitalWrite(thisPin, HIGH);
}
break;
default:
// any other key pressed will turn the lights off..
Serial.println("ALL LIGHTS OFF.");
for (int thisPin = 2; thisPin < 11; thisPin++) {
digitalWrite(thisPin, LOW);
}
}
}
}
void command_handler()
{
byte cmd, buf[CHB_MAX_PAYLOAD];
// check to see if any new data has been received. if so, then we need to handle it.
if (chibiDataRcvd())
{
// retrieve the data from the chibi stack
chibiGetData(buf);
}
}