Show Posts
|
|
Pages: [1] 2 3 4
|
|
2
|
Using Arduino / LEDs and Multiplexing / Re: UCS1903 Library or compatible?
|
on: March 22, 2013, 11:52:18 am
|
|
Thanks for that Garcia, i understand what it does but at the moment i am a little bit behind on the coding, the library i found on Github works great and usues simple functions to call, similar to what you have mentioned about the array, but works in the way led.set("led number" "red value" "green value" "blue value")
Rich
|
|
|
|
|
3
|
Using Arduino / LEDs and Multiplexing / Need help with a Boolean operation and simplification on LED Keypad
|
on: March 22, 2013, 06:56:11 am
|
Hi All, i am contructing a CAN based keypad for a motorsport vehicle, Currently i am merging some code to read a keypad and switch on a corresponding LED above it I am having trouble with the Boolean "i" ststement as it requires 2 pushes of a keypad to extinguish or illuminate an led, if the same operation has been perfomed on a diffrerent key I understand why it is doing it, as it needs to switch from i = 1 to i = 0 before it can switch an LED on again, i just cant seem to get my head round doing it, also i would like to simplify it a little but not sure how. Hope you are able to help Many thanks Rich
#include <Keypad.h> // Include Keypad library #include <Ucs1903.h> // Include LED Controller Library
#define NUM_LEDS 4 // Defines Number of LED's #define PIN 13 // Defines Data Pin for LED's
Ucs1903 ledStrip(PIN, NUM_LEDS);
boolean i = 0; //Defines Switch State
int j = 0; // Variable to Define which LED to Switch
const byte ROWS = 5; //defines number of rows const byte COLS = 3; //defines number of columns
char keys[ROWS][COLS] = { //define the symbols on the buttons of the keypads as an array {'1','2','3'}, {'4','5','6'}, {'7','8','9'}, {'0','A','B'}, {'C','D','E'}, };
byte rowPins[ROWS] = {9, 8, 7, 6, 5}; //connect to the row pinouts of the keypad byte colPins[COLS] = {12, 11, 10,}; //connect to the column pinouts of the keypad Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );
void setup(){
keypad.addEventListener(keypadEvent); //Listen for a keypad Press } void loop(){ char key = keypad.getKey(); if (key) { } if (i==1){ ledStrip.setLed(j, 0, 0, 75); // Turn on LED if Putton has been Pressed } else ledStrip.setLed(j, 0, 0, 0); // Else Turn LED Off ledStrip.show(); // Send Data to LED Controller }
void keypadEvent(KeypadEvent key){ //What to do when a particular Key is pressed switch (keypad.getState()){ case PRESSED: switch (key){ case '1': i = !i, j= 0; break; case '2': i = !i, j= 1; break; case '3': i = !i, j= 2; break; case '4': i = !i, j= 3; break; case '5': break; case '6': break; case '7': break; case '8': break; case '9': break; } break; } }
|
|
|
|
|
6
|
Using Arduino / LEDs and Multiplexing / Re: UCS1903 Library or compatible?
|
on: March 21, 2013, 04:04:48 am
|
|
The testLeds_2 folder actually contains support for the UCS1903 so i have it working on the bench and changing colour, but i dont understand the example code as i posted above,
The TLC5490 was simple, LED.Set and LED.update were simple commands, but i dont understand the commands used to set the data, the layout of the data its expecting to see, and the command to update the data in the chip?
Im not an experienced programmer and ive been racking my brains for hours trying different keywords in the list to get it to do a simple "set Led 1 red" for example
Cheers
Rich
|
|
|
|
|
7
|
Using Arduino / LEDs and Multiplexing / UCS1903 Library or compatible?
|
on: March 20, 2013, 11:12:25 am
|
Hi All, i have some 1903 RGB strip , 9 LED's long, and i would like to address each LED colour individually, i,e, set LED 1 to orange, 3 to red, 4 to greet etc I have some experience with the TLC5490 but these are a different kettle of fish, i have a Fast Spi library i discovered on the net, but the keywords dont seem to reference to this particular chip I have this so far #include "FastSPI_LED2.h"
#define NUM_LEDS 4
struct CRGB { byte r; byte b; byte g; };
struct CRGB leds[NUM_LEDS];
UCS1903Controller400Mhz<3> LED; // Sets the Controller to be UCS1903
void setup() {
LED.init(); //Initialise LED Controller }
void loop() {
for(int i = 0; i < 3; i++) { for(int iLed = 0; iLed < NUM_LEDS; iLed++) { memset(leds, 0, NUM_LEDS * sizeof(struct CRGB)); switch(i) { case 0: leds[iLed].r = 255; break; case 1: leds[iLed].g = 255; break; case 2: leds[iLed].b = 255; break; }
LED.showRGB((byte*)leds, NUM_LEDS);; delay(100); } }
}
This is an expample provided which just runs the led's through each of the 3 colours continuousle, but i simple want to write a value and send it, sorry i cant offer more insight Keywords supplied, start KEYWORD2 stop KEYWORD2 init KEYWORD2 setLeds KEYWORD2 setChipset KEYWORD2 setCPUPercentage KEYWORD2 setRGBData KEYWORD2 getRGBData KEYWORD2 setDirty KEYWORD2 show KEYWORD2 getCounter KEYWORD2 clearCounter KEYWORD2 getCycleTime KEYWORD2 getCycleTarget KEYWORD2 Thanks all Rich
|
|
|
|
|
8
|
Using Arduino / LEDs and Multiplexing / VC064T-16 16x32 Matrix control Anyone?
|
on: December 04, 2012, 06:50:57 am
|
|
Hi all, i have recently aquired 4 off 16x32 dual colour LED Matricies from a clearance,
The datasheet shows the control chip to be from Vissem but little else,
There is a timing sheet that shows the control to be Via Serial Data, and Address A0 to A3, maybe a BCD?
Has anyone ever used one? o know of some libraries i could adapt? there seems to be very little info on the web
many thanks to all
Rich
|
|
|
|
|
10
|
Using Arduino / LEDs and Multiplexing / Re: Anyone seen this Matrix before?
|
on: November 30, 2012, 07:21:48 am
|
|
Yea, the Matricies are CSM-88121Y, i have a data sheet for them and i have a rough idea of how the shift registers will work the display, but not the BCD chip, is that just to count up and refresh each column ?
Its a bit over my head at the moment..
Thanks
Rich
|
|
|
|
|
11
|
Using Arduino / LEDs and Multiplexing / Re: Anyone seen this Matrix before?
|
on: November 28, 2012, 10:41:14 am
|
OK, so i think i have decoded the schematic and it looks as if the Cathodes (Columns) are being driven via serial, ( UCN5822A ) per 8x8 Matrix, with the Anodes (Rows) being driven via a 8 channel driver, by a BCD (HEF4028BT) I will post my (very rough) schematic below, Where the Wavy lines break up the signal lines it is to denote that each line has an Inductor, resistor and Mosfet in as a switching circuit, So i guess my question is, are there any libraries or anything that might help me get this up and running? i have searched the forums with little success. Thanks Rich 
|
|
|
|
|
12
|
Using Arduino / LEDs and Multiplexing / Anyone seen this Matrix before?
|
on: November 28, 2012, 06:20:24 am
|
HI all i came across this in my attic, i had forgotten about it, Just wondering if anyone had seen anyone do something with it on the Arduino so far? 10 times 8x8 matrix displays 2 off 74ABT541 Octal Buffer 1 off HEF4028BT 1 - 10 Decoder 1 off UDN2982LW 8 channel source driver 10 off UCN5822A 8 Bit Serial Input latch drivers I am currently trying to reverse engineer the schematic to make sense of it and see how diffuclt or simple it would be to run with an Arduino    Thanks All
|
|
|
|
|
14
|
Using Arduino / LEDs and Multiplexing / DMX512 questions
|
on: November 26, 2012, 10:49:22 am
|
|
Hi All, i am looking at using a matrix of 30 x 30 RGB led's using WS2801's
My question is weather each DMX channel is assigned to an individual colour of each LED, or if it is each WS2801 that is addressed?
as the SPI to DMX interface i am looking at using has a max number of channels of 1024, so a 900 LED array would need either 900 channels if each WS2801 is addressed, or 2700 channels if each colour of each RGB is addressed,
Many thanks for the information
Rich
|
|
|
|
|