Show Posts
|
|
Pages: 1 ... 7 8 [9] 10
|
|
122
|
Using Arduino / LEDs and Multiplexing / Re: Sure Electronics new 32x16 bi-color display: 3216 RG -Cont. from read only forum
|
on: July 11, 2011, 02:30:09 pm
|
I've tried hooking up a 3208 display, but it doesn't seem to work yet. I changed the GEOM to 32x8, used a 5x7 font, but nothing shows on the display when i upload the code. ht1632c dotmatrix = ht1632c(PORTB, 2, 3, 4, 5, GEOM_32x8, 1); using and arudino UNO, have the following mappings arduino->display 2->7 3->5 4->6(READ Clock according to 3208 data sheet) 5->3(CS1, I flipped CS1 switch on board) Anyone have any ideas?
|
|
|
|
|
123
|
Using Arduino / Networking, Protocols, and Devices / Is it possible to use the WT11/12 Arduino BT as a HID reciever?
|
on: June 22, 2011, 10:00:37 pm
|
|
I've been trying to find out if it's possible to use the BT Arduino (or arduino with a bluegiga bluetooth module) as an HID receiver...like a usb dongle for the pc. I'm trying to work on a project that will allow the arduino to be paired with a bluetooth keyboard, and then send the text over the serial line to the processor.
So far, I've found threads and links for how to make the arduino INTO a bluetooth keyboard, but I can't find anything on how to use the HID profile of the module to act as a receiver for a BT keyboard.. is this possible?
What I'm ultimately thinking is that the keyboard pairs to the WT12/arduino, the WT12 feeds the bytes received out to the UART in the processor, the processor runs code to display the received keys. I know how to set it up as a SPP profile, so i suppose i could create an android app or something to send text over SPP to the module, but I'm trying to figure out how to use a keyboard. If my phone can connect to a keyboard, the arduino should be able to as well...right?
|
|
|
|
|
124
|
Using Arduino / Programming Questions / Re: Receive text over Serial and display after enter key is detected?
|
on: June 16, 2011, 08:41:13 pm
|
const int bufferSize = 128; char inputBuffer[bufferSize]; int bufferPointer = 0; void loop() { char inByte;
if (Serial.available()) { inByte = Serial.read();
if (inByte == '\n') { // 'newline' character inputBuffer[bufferPointer++] = '\0'; scrolltextsizexcolor(0,inputBuffer,2,GREEN, 0,my2font,8,8,'G',0); bufferPointer = 0; } else { // not a 'newline' character if (bufferPointer < bufferSize - 1) // Leave room for a null terminator inputBuffer[bufferPointer++] = inChar; } }
John Thanks for the input.. I had to change "inChar" at the end to "inByte", and add a "}" at the end but it works. Where do I send the beer? 
|
|
|
|
|
126
|
Using Arduino / LEDs and Multiplexing / Re: Sure Electronics new 32x16 bi-color display: 3216 RG -Cont. from read only forum
|
on: June 16, 2011, 04:20:37 pm
|
I'm just waiting for my HT1632C's arrive to start working with my displays. Unfortunately I burned two HT1632C IC's, and have no idea of what happen. Maybe some voltage spike or as I stored my displays on a plastic box, static electricity killed them.
Where are you getting them from? the only place I could find was Sureelectronics themselves, but nowhere else. I was contemplating making my own LED board instead of tying multiples together from them. (128x32)
|
|
|
|
|
127
|
Using Arduino / LEDs and Multiplexing / Re: Sure Electronics new 32x16 bi-color display: 3216 RG -Cont. from read only forum
|
on: June 16, 2011, 04:01:06 pm
|
Guys, will the new library thats on google that lonelywolf and others have worked on work for 3208 displays too? I was planning on getting two 32x08 displays to tie together to use for electronic name signs at my job. I already know a few things would need to be modified, namely: #define CHIP_MAX (4*Number_of_Displays) //Four HT1632Cs on one board #define X_MAX (32*Number_of_Displays -1) #define Y_MAX 15 would need to be changed to 1*Num_of_displays and Y_MAX would need to = 8, but other than that the library should work, yes? Thanks.
|
|
|
|
|
128
|
Using Arduino / Programming Questions / Receive text over Serial and display after enter key is detected?
|
on: June 15, 2011, 04:01:10 pm
|
I've been scouring the internet, and these forums, trying to understand how to use serial.read to read in text from the serial port, and upon receving the enter key (carriage return?) send the string to a Sure 3216 display. I've been on the internet long enough to know how this works, so please dont flame me with "do a search" because I've looked at the following resources: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1267807830http://www.adafruit.com/forums/viewtopic.php?f=8&t=9918 <-- this is written wrong, but even after I got it to compile it didn't work and I've also tried searching google for "read text from serial" and other terms, only finding bits about how to read a character at a time, etc. My Code is //THIS WORKS BELOW void loop() { char input[10]; memset(input, '\0', 10); byte inByte = '\0'; while(inByte != '!') { inByte = Serial.read(); // Wait for the start of the message } if(inByte == '!') { while(Serial.available() < 8) { // Wait until we receive 8 characters ; } for (int i=0; i < 8; i++) { input[i] = Serial.read(); // Read the characters into an array } } scrolltextsizexcolor(0,input,2,GREEN, 0,my2font,8,8,'G',0); } This works, but to use it, I have to send "!" followed by exactly 8 characters (or whatever I set the count to...10,15,etc). I haven't figured out (because I don't know C that well) how to basically flip this so that instead of waiting for a ! and then reading to 8, it reads until it sees enter and then displays what it has. Can someone help me figure this out? TIA!
|
|
|
|
|
129
|
Using Arduino / LEDs and Multiplexing / Re: Sure Electronics new 32x16 bi-color display: 3216 RG -Cont. from read only forum
|
on: June 10, 2011, 05:58:48 pm
|
first of all, excellent contributions and work to lonewolf and others for proceeding to improve the code required to drive these displays and make them work better. Using what I've learned here, I've been able to successfully get 3 displays to scroll status messages. I'm working on a project utilzing 3216 displays and parts of this code, but I'm stuck on something, maybe someone here can help? I've got the following in my void loop section: void loop () { if(Serial.available() > 0) // Is there anything to read? { serialIndex = 0; while(Serial.available() > 0) { char aChar = Serial.read(); serialIn[serialIndex] = aChar; // Store the character read serialIndex++; // Point to the next position serialIn[serialIndex] = '\0'; // NULL terminate the string }
// Now do something with the string... scrolltextsizexcolor(0,serialIn,2,GREEN, 0,my2font,8,8,'G',0); } } While this works, its buggy. if I type in say, "abcde", the "a" scrolls across immediately, followed by a few spaces, then the "bcde" follows as it should...as if I had entered "a bcde". I need it (at least for now) to wait till the whole string is entered, or the user hits enter. I ultimately want to be able to update via a bluetooth keyboard or android app. In order to do this, I need to write something that monitors the serial port and then detects when the user hits enter, and displays the message. forgive me as C/C++ is not my thing, so I'm still learning. I'm ultimately trying to read in a string, and upon receiving enter key (or carriage return) it dumps the text to the panels.
|
|
|
|
|
130
|
Using Arduino / Programming Questions / Any way to visualize hex fonts, before loading onto display?
|
on: April 20, 2011, 12:23:33 pm
|
|
Is there a program available that can visualize hex code in font.h files?
For example, if I have {0x7E,0x81,0xA9,0x8D,0x8D,0xA9,0x81,0x7E}, looking for something that would show me 0.
Thanks.
|
|
|
|
|
131
|
Using Arduino / Programming Questions / Re: So confused on using TheDotFactory to create fonts for app... Please help.
|
on: April 19, 2011, 05:20:55 pm
|
well I seemed to have figured it out on my own, sort of, but I don't know how to create new fonts that will work. What I did, was screw around with enough settings, I finally tried changing the size integer. Everything else I tried resulted in garbage being sent to the LED displays, but the size value changed it. I now have the following: scrolltextsizexcolor(0,"ON A CALL ",2,RED, 0,my2font,8,8,'G',0); This results in it filling 15 of the 16 rows on the display. If anyone can still help me figure out how to change fonts I would appreciate the assistance.
|
|
|
|
|
132
|
Using Arduino / Programming Questions / Re: So confused on using TheDotFactory to create fonts for app... Please help.
|
on: April 19, 2011, 12:17:48 am
|
Justin, Thanks for the response. I had previously seen his code, but I don't understand how each character gets called. In the code pasted, I see the message below: * 2. The Dot Factory ( http://www.pavius.net/downloads/tools/53-the-dot-factory) * This a good windows software for using fonts but bitmaps, too. * For using bitmaps/fonts select the tool icon, check "Flip X", "90°" at Flip/Rotate. "Width" at Fixed, "MsbFirst" if it wasn't. * You can import any bitmap. * Ppush Generate, replace the "const uint_8" " with "unsigned char PROGMEM" and call the bitmap by with its name. So I did that. I used verdana 16pt font to generate all characters, and pasted that into my program (instead of using external files. A sample is below: 0x00, 0x00, 0x00, /* */ 0x00, 0x00, 0x00, /* */ 0x00, 0x00, 0x00, /* */ 0x00, 0x00, 0x00, /* */ 0x7F, 0xFF, 0x80, /* ################ */ 0x7F, 0xFF, 0x80, /* ################ */ 0x70, 0x00, 0x00, /* ### */ 0x3E, 0x00, 0x00, /* ##### */ 0x0F, 0x80, 0x00, /* ##### */ 0x01, 0xE0, 0x00, /* #### */ 0x00, 0x78, 0x00, /* #### */ 0x00, 0x78, 0x00, /* #### */ 0x01, 0xE0, 0x00, /* #### */ 0x07, 0x80, 0x00, /* #### */ 0x1E, 0x00, 0x00, /* #### */ 0x70, 0x00, 0x00, /* ### */ 0x7F, 0xFF, 0x80, /* ################ */ 0x7F, 0xFF, 0x80, /* ################ */ 0x00, 0x00, 0x00, /* */ 0x00, 0x00, 0x00, /* */ 0x00, 0x00, 0x00, /* */ 0x00, 0x00, 0x00, /* */ 0x00, 0x00, 0x00, /* */ 0x00, 0x00, 0x00, /* */ 0x00, 0x00, 0x00, /* */ 0x7F, 0xFF, 0x80, /* ################ */ 0x7F, 0xFF, 0x80, /* ################ */ 0x70, 0x00, 0x00, /* ### */ 0x7C, 0x00, 0x00, /* ##### */ 0x1F, 0x00, 0x00, /* ##### */ 0x07, 0x80, 0x00, /* #### */ 0x01, 0xE0, 0x00, /* #### */ 0x00, 0x78, 0x00, /* #### */ 0x00, 0x1E, 0x00, /* #### */ 0x00, 0x07, 0x80, /* #### */ 0x7F, 0xFF, 0x80, /* ################ */ 0x7F, 0xFF, 0x80, /* ################ */ 0x00, 0x00, 0x00, /* */ 0x00, 0x00, 0x00, /* */ 0x00, 0x00, 0x00, /* */ I pasted this in at the beginning: unsigned char PROGMEM verdana16ptBitmaps[] = , as instructed. I then went down to where text operations are performed, and changed the font name to the following: // scrolltextxsize(y location, string , size as integer, colorname (RANDOMCOLOR for random color), name of the second color (instead of BLACK), name of the font array, number of columns, number of rows, 'G' for Gimp or 'T' for The Dot Factory font arrays, delaytime in milliseconds)
//scrolltextsizexcolor(4,"ON A CALL ",1,RED, 0,my2font,8,8,'G',10); scrolltextsizexcolor(0,"ON A CALL ",1,RED, 0,verdana16ptBitmaps,20,16,'T',10); At the beginning of the code I also changed the variable for NUMCOLUMS to 20, which is what it looks like is referenced in TheDotFactory information: // insert here the number of columns of your font files // the compiler will comment how large the number of columns // should be #define NCOLUMNS 20 I tried to compile it but I get the following error: ht1632_kjus_1b_er.cpp: In function 'void loop()': ht1632_kjus_1b_er:3311: error: cannot convert 'unsigned char*' to 'unsigned char (*)[20]' for argument '6' to 'void scrolltextsizexcolor(int, char*, char, byte, byte, unsigned char (*)[20], int, char, char, int)' This is where I'm confused. First, do I need to include the descriptor lookup table? am i calling the font correctly? I'm missing something but I don't know what.
|
|
|
|
|
133
|
Using Arduino / Programming Questions / Re: Problems sending data thru I2C
|
on: April 18, 2011, 07:44:09 pm
|
maybe you can post your working coding for other who have a similar problem?
I hate when people don't do that...makes it impossible to figure out when you have the same issue  Please share your code that made it work in case others come across the same problem.
|
|
|
|
|