i enclosed the project which i work please help me
i get this error
Exception in thread "Thread-19" java.lang.StackOverflowError
display making details.docx (1.09 MB)
24x6code.txt (34.4 KB)
i enclosed the project which i work please help me
i get this error
Exception in thread "Thread-19" java.lang.StackOverflowError
display making details.docx (1.09 MB)
24x6code.txt (34.4 KB)
Hi, your posted files do not display very well.
Can you convert the docx file to PDF, check it then post it.
The program can be posted in you post using tags,
insert code.
[ code] [ /code]
I fail to see why you have java errors are, the arduino is programmed in a type of C++, so if you have compiling errors then that could be why.
A schematic of your project will be essential if we are to be able to help you.
Tom....
/ *
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# File: Matrix_24x6_Scrolling_Message_MPM.ino
# Micro-processor: Arduino UNO
# Language: Wiring / C / Processing / Fritzing / Arduino IDE
#
# Purpose: Scrolling LED Dot Matrix
#
# Operation: Scrolls a message on a 24x6 LED array
# Accept the message via serial communication and
the display shows # matrix
#
# Author: Marcelo Moraes
# Date: 24/07/12
# Location: Sorocaba - SP
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
This example is a public domain code.
* /
/ / define all symbols
# define BA {B01110000, B10001000, B10001000, B11111000, B10001000, B10001000} / / 0
# define BB {B11110000, B10001000, B10001000, B11110000, B10001000, B11111000}
# define BC {B11111000, B10000000, B10000000, B10000000, B10000000, B11111000}
# define BD {B11110000, B10001000, B10001000, B10001000, B10001000, B11110000}
# define BE {B11111000, B10000000, B10000000, B11110000, B10000000, B11111000}
# define BF {B11111000, B10000000, B10000000, B11110000, B10000000, B10000000}
# define BG {B01110000, B10001000, B10000000, B10011000, B10001000, B01110000}
# define BH {B10001000, B10001000, B11111000, B10001000, B10001000, B10001000}
# define BI {B11111000, B00100000, B00100000, B00100000, B00100000, B11111000}
# define BJ {B00111000, B00010000, B00010000, B00010000, B10010000, B01100000}
# define BM {B10001000, B11011000, B10101000, B10101000, B10001000, B10001000}
# define BN { B10001000, B11001000, B10101000, B10101000, B10011000, B10001000}
# define BL {B10000000, B10000000, B10000000, B10000000, B10000000, B11111000}
# define BO {B01110000, B10001000, B10001000, B10001000, B10001000, B01110000}
# define BP {B11110000, B10001000, B10001000, B11110000, B10000000, B10000000}
# define BQ {B01110000, B10001000, B10101000, B10011000, B01111000, B00001000}
# define BR {B11110000, B10001000, B10001000, B11110000, B10001000, B10001000}
# define BS {B01110000, B10001000, B01100000, B00010000, B10001000, B01110000}
# define BK {B10001000, B10010000, B11100000, B11100000, B10010000, B10001000}
# define BT {B11111000, B00100000, B00100000, B00100000, B00100000, B00100000}
# define BU {B10001000, B10001000, B10001000, B10001000, B10001000, B01110000}
# define BV {B10001000, B10001000, B10001000, B10001000, B01010000, B00100000}
# define BW {B10001000, B10001000, B10101000, B10101000, B10101000, B01010000}
# define BX {B10001000, B01010000, B00100000, B00100000, B01010000, B10001000}
# define BY {B10001000, B01010000, B00100000, B00100000, B00100000, B00100000}
# define BZ {B11111000, B00001000, B00110000, B01100000, B10000000, B11111000}
# define LA {B00000000, B01110000, B00001000, B01111000, B10001000, B01111000}
# define LB {B10000000, B10000000, B10110000, B11001000, B10001000, B11110000}
# define LC {B00000000, B01110000, B10000000, B10000000, B10001000, B01110000}
# define LD {B00001000, B00001000, B01111000, B10001000, B10001000, B01111000}
# define LE {B00000000, B01110000, B10001000, B11111000, B10000000, B01110000}
# define LF {B00110000, B01001000, B01000000, B11100000, B01000000, B01000000}
# define LG {B00000000, B01111000, B10001000, B01111000, B00001000, B01110000}
# define LH {B10000000, B10000000, B10110000, B11001000, B10001000, B10001000}
# define LI {B00100000, B00000000, B01100000, B00100000, B00100000, B01111000}
# define LJ {B00010000, B00000000, B00111000, B00010000, B10010000, B01100000}
# define LK { B10000000, B10010000, B10100000, B11000000, B10100000, B10010000}
# define LL {B01100000, B00100000, B00100000, B00100000, B00100000, B01111000}
# define LM {B00000000, B00000000, B11010000, B10101000, B10101000, B10001000}
# define LN {B00000000, B00000000, B10110000, B11001000, B10001000, B10001000}
# define LO {B00000000, B01110000, B10001000, B10001000, B10001000, B01110000}
# define LP {B00000000, B11110000, B10001000, B11110000, B10000000, B10000000}
# define LQ {B00000000, B01101000, B10011000, B01111000, B00001000, B00001000}
# define LR {B00000000, B00000000, B10110000, B11001000, B10000000, B10000000}
# define LS {B00000000, B01110000, B10000000, B01110000, B00001000, B11110000}
# define LT {B01000000, B01000000, B11100000, B01000000, B01001000, B00110000}
# define LU {B00000000, B00000000, B10001000, B10001000, B10011000, B01101000}
# define LV {B00000000, B00000000, B10001000, B10001000, B01010000, B00100000}
# define LW {B00000000, B00000000, B10001000, B10101000, B10101000, B01010000}
# define LX {B00000000, B10001000, B01010000, B00100000, B01010000, B10001000}
# define LY {B00000000, B10001000, B10001000, B01111000, B00001000, B01110000}
# define LZ {B00000000, B11111000, B00010000, B00100000, B01000000, B11111000}
# define SPACE {B00000000, B00000000, B00000000, B00000000, B00000000, B00000000}
# define NUM0 {B01110000, B10011000, B10101000, B10101000, B11001000, B01110000}
# define NUM1 {B00100000, B01100000, B10100000, B00100000, B00100000, B01110000}
# define NUM2 {B01110000, B10001000, B00001000, B01110000, B10000000, B11111000}
# define NUM3 {B11110000, B00001000, B00001000, B01111000, B00001000, B11110000}
# define NUM4 {B10001000, B10001000, B10001000, B11111000, B00001000, B00001000}
# define NUM5 {B11111000, B10000000, B11110000, B00001000, B10001000, B01110000}
# define NUM6 {B11111000, B10000000, B11111000, B10001000, B10001000, B11111000}
# define NUM7 {B11111000, B00001000, B00001000, B01111000, B00001000, B00001000}
# define NUM8 { B11111000, B10001000, B11111000, B10001000, B10001000, B11111000}
# define NUM9 {B11111000, B10001000, B11111000, B00001000, B00001000, B11111000}
# define devide {B00001000, B00010000, B00100000, B00100000, B01000000, B10000000}
# define TWODOTS {B01100000, B01100000, B00000000, B00000000, B01100000, B01100000}
# define DOT {B00000000, B00000000, B00000000, B00000000, B01100000, B01100000}
# define EAT {B00000000, B00000000, B00000000, B00110000, B00110000, B01100000}
# define LINE {B00000000, B00000000, B11111000, B11111000, B00000000, B00000000}
# define quastion {B01110000, B10001000, B00010000, B00100000, B00000000, B00100000}
# define MARK {B00100000, B01110000, B01110000, B00100000, B00000000, B00100000} / / 69
# define NUM {B00000000, B01010000 , B11111000, B01010000, B11111000, B01010000} / / 70
# define SMILE {B00000000, B00010000, B11001000, B00001000, B11001000, B00010000}
# define HEART {B00000000, B01010000, B10101000, B10001000, B01010000, B00100000}
# define ASP {B00100000, B00100000, B00010000, B00000000, B00000000, B00000000}
# define PARH {B00100000, B01000000, B01000000, B01000000, B01000000, B00100000}
# define ADR {B00100000, B00010000, B00010000, B00010000, B00010000, B00100000}
# define AST {B10101000, B01110000, B11111000, B01110000, B10101000, B00000000}
# define PLU {B00000000, B00100000, B00100000, B11111000, B00100000, B00100000}
# define POV {B01100000, B01100000, B00000000, B01100000, B00100000, B01000000}
# define EQU {B00000000, B00000000, B01110000, B00000000, B01110000, B00000000}
# define BRR {B01100000, B01000000, B01000000, B01000000, B01000000, B01100000} / / 80
# define BAR {B10000000, B01000000, B00100000, B00100000, B00010000, B00001000}
# define BRL {B00110000, B00010000, B00010000 , B00010000, B00010000, B00110000}
# define UND {B00000000, B00000000, B00000000, B00000000, B00000000, B11111000}
# define PIP {B00100000, B00100000, B00100000, B00100000, B00100000, B00100000}
# define PACM {B01110000, B10111000, B11111000, B00111000 , B11111000, B01110000} / / 85
# define CHAP {B00000000, B01000000, B10101000, B00010000, B00000000, B00000000}
# define TIL {B00000000, B00100000, B01010000, B10001000, B00000000, B00000000}
# define ROB {B10110100, B10000100, B01111000, B00110000, B01001000, B11001100}
# define SQR {B10101000, B01010100, B10101000, B01010100, B10101000, B01010100}
# define MAJ {B00000000, B10000000, B01000000, B00100000, B01000000, B10000000}
# define MIN {B00000000, B00000100, B00001000, B00010000, B00001000, B00000100}
# define SQUARE {B11111100, B10000100, B10000100, B10000100, B10000100, B11111100}
/ / end definition of symbols
24x6normal.pdf (7.42 KB)
24x6serial.pdf (15.4 KB)
display making details.pdf (1.12 MB)
http://forum.arduino.cc/index.php/topic,148850.0.html
Please read this link to post your code and documents properly.
The problem you have, is it the arduino program or the program you are using in the PC?
Tom...
[code]/ / definition of Arduino pins
latchPin int = 10; / / pin latch shift register "shift register "
clockPin int = 13; / / clock pin of the shift register "shift register"
dataPin int = 11; / / data pin of the shift register "shift register"
int clock = 9 / / pin clock counter 4017
int = Reset 8 / / reset pin of the counter 4017
/ / end definition of Arduino pins
/ / pin configuration for easy operation with the Arduino PORTB
= int latchPinPORTB latchPin - 8 / / latch pin
int clockPinPORTB clockPin = - 8; / / clock pin
int = dataPinPORTB dataPin - 8 / / data pin
/ / definition and initialization of variables
int i = 0; / / start counting auxiliary variable
incomingByte int [44]; / / array that stores the incoming byte
scrolling_word byte [6] [3] / / this is for ralamento text
array_turn int = 0; / / array auxiliary
byte patterns [100] [6] / / this array stores the text to be scrolled on the display
/ / each containing matrix of symbols, 86 symbols, each symbol with 8 rows and 6 columns of bits
dummy_array byte [93] [6]
initial loop Arduino; runs once at startup
void setup () {
Serial.begin (9600) ;/ / initialize the serial communication with the PC at 9600 boud
/ / set all
resets the counter 4017
digitalWrite (Reset, HIGH);
digitalWrite (Reset, LOW);
setupSPI () / / initialize SPI communication
}
/ / end loop start
/ / function to display pricipal and roll the words
display_word void (int loops , word_print byte [] [6], num_patterns int, int delay_langth) {
/ / arguments used:
/ / loops - how often to run
/ / word_print - array that stores the word to be displayed
/ / num_patterns - number of symbols in the array
/ / delay_langth - delay loop (how many times will run, increasing this value the message scrolls slower and vice versa)
i = 0; / / auxiliary variable in counts
for (int first = 0; first <6, first + + ) {/ / resetting the matrix scrolling_word
for (int second = 0; second <5; second + +)
scrolling_word [first] [second] = 0x00; / / put 0x00 in each position of the array (starts empty)
}
for (int x = 0, x <num_patterns, x + +) {/ / main loop that goes over all the symbols
for (int scroll = 0; scroll <6; scroll + +) {/ / loop to scroll, each symbol rolls by 6 columns
for (int r = 0, r <6, r + +) {/ / going over all the lines
/ / this is the function scroll is like doing a word of 3 byte to move at once
scrolling_word [r] [2] = ( scrolling_word [r] [2] << 1) + ((scrolling_word [r] [1] & 0x80) >> 7);
scrolling_word [r] [1] = (scrolling_word [r] [1] << 1) + ((scrolling_word [r] [0] & 0x80) >> 7);
scrolling_word [r] [0] = (scrolling_word [r] [0] << 1) + (((word_print [x] [r] << scroll) & 0x80) >> 7);
}
/ / roll the same data by 6 lines delay_langht times (cause delay and persistence information
for (int t = 0, t <delay_langth, t + +) {/ / a delay loop that only shows the same picture over and over to create a delay
for (int y = 0; y <6, y + +) {/ / loop scanning passing on all 6 lines
if (i == 6) {/ / if the 4017 accountant counted to 6 reboots
digitalWrite (Reset, HIGH);
digitalWrite (Reset, LOW);
i = 0; / / reset the counter
}
latchOff () ;/ / starting communication with shift registers
spi_transfer (scrolling_word [y ] [2]) / / sending information (3 bytes)
spi_transfer (scrolling_word [y] [1]);
spi_transfer (scrolling_word [y] [0]);
latchOn () / / call function
delayMicroseconds (800) / / a small delay for each line
latchOff () / / call function
/ / clearing the shift registers to make sure it will not be a ghosting
spi_transfer (0) / / send anything in SPI communication
spi_transfer (0);
spi_transfer (0);
latchOn () / / call function
/ / advance the counter in a 4017 (we just send a positive pulse)
digitalWrite (clock, HIGH) / / clock goes high
digitalWrite (clock, LOW); / / clock goes down
i + + / / next iteration
}
}
}
}
finish_scroll (delay_langth) / / calling a function to finish rolling the last 4 symbols
}
/ / end of this function
/ / this function ends scrolling and is very similar function display_word
void finish_scroll (int delay_scroll) {
for (int n = 0, n <26, n + +) {
for (int h = 0, h <6 H + +) {
scrolling_word [h] [2] = (scrolling_word [h ] [2] << 1) | ((scrolling_word [h] [1] & 0x80) >> 7);
scrolling_word [h] [1] = (scrolling_word [h] [1] << 1) | ((scrolling_word [h] [0] & 0x80) >> 7);
scrolling_word [h] [0] = (scrolling_word [h] [0] << 1) | 0;
}
for (int t = 0, t <delay_scroll, t + + ) {
for (int y = 0, y <6, y + +) {
if (i == 6) {
digitalWrite (Reset, HIGH);
digitalWrite (Reset, LOW),
i =
end of this function
/ / main loop Arduino
void loop () {
/ / send data only when data is received
if (Serial.available ()> 0) {/ / if data are to be read
delay (100); / / small delay
incomingByte [array_turn] = Serial.read () ;/ / put the symbol in the matrix
array_turn + + / / counting the number of incoming symbols
}
else {/ / Otherwise ...
/ / this part is to get the information we and put it in a way we can work with it
if (array_turn! = 0) {/ / if variable array_turn is not 0, it means that we símboloa to be shown
for (int z = 0, z <array_turn, az + +) {/ / checks each symbol, if letters are between "65 and 90" or "97 and 122" in ASCII
/ / numbers are between "53 and 62" in ASCII
if ((incomingByte [az]> 64 && incomingByte [az] < 91) | | (incomingByte [az]> 96 && incomingByte [az] <123)) {
if (incomingByte [az]> 64 && incomingByte [az] <91) {/ / for letters between "
patterns [az] [lol] = dummy_array [incomingByte [az] - 65] [lol] / / subtract 65 to get the index in the array pattern (think the tint symbol "letter" received)
}
else {/ / to numbers
for (int lol = 0; lol <6; lol + +) / / for each index of array
patterns [az] [lol] = dummy_array [incomingByte [az] - 53] [lol] / / subtract 53 to get the index the pattern matrix (think the tint symbol "number" received)
}}
else {/ / for other symbols
switch (incomingByte [az]) {
case 32: / / space
for (int lol = 0; lol <6; lol + + )
patterns [az] [lol] = dummy_array [26] [lol];
break;
case 33: / / cry
for (int lol = 0; lol <6; lol + +)
patterns [az] [lol] = dummy_array [43] [lol];
break;
[/code]
[code][code]case 35: / / stuff
for (int lol = 0; lol <6; lol + +)
patterns [az] [lol] = dummy_array [70] [lol];
break;
case 37: / / smile
is (int lol = 0; lol <6; lol + +)
patterns [az] [lol] = dummy_array [71] [lol];
break;
case 36: / / pacmam
for (int lol = 0; lol <6; lol + +)
patterns [az] [lol] = dummy_array [85] [lol];
break;
case 38: / / heart
for (int lol = 0; lol <6; lol + +)
patterns [az] [lol] = dummy_array [72] [lol ];
break;
case 39: / / quotes
for (int lol = 0; lol <6; lol + +)
patterns [az] [lol] = dummy_array [73] [lol];
break;
case 40: / / parenthesis right
for ( int lol = 0; lol <6; lol + +)
patterns [az] [lol] = dummy_array [74] [lol];
break;
case 41: / / parenthesis left
for (int lol = 0; lol <6; lol + +)
patterns [az] [lol] = dummy_array [75] [lol];
break;
case 42: / / asterisk
for (int lol = 0; lol <6; lol + +)
patterns [az] [lol] = dummy_array [76] [lol ];
break;
case 43: / / more
for (int lol = 0; lol <6; lol + +)
patterns [az] [lol] = dummy_array [77] [lol];
break;
case 45: / / line
for (int lol = 0; lol <6; lol + +)
patterns [az] [lol] = dummy_array [41] [lol];
break;
case 44: / / comma
for (int lol = 0; lol <6; lol + +)
patterns [az ] [lol] = dummy_array [40] [lol];
break;
case 46: / / point
for (int lol = 0; lol <6; lol + +)
patterns [az] [lol] = dummy_array [39] [lol];
break;
case 47: / / bar division
for (int lol = 0; lol <6; lol + +)
patterns [az] [lol] = dummy_array [37] [lol];
break;
case 48: / / 0
for (int lol = 0; lol <6; lol + +)
patterns [az] [lol] = dummy_array [27] [lol];
break;
case 49: / / 1
for (int lol = 0; lol <6; lol + +)
patterns [az] [lol] = dummy_array [28] [lol];
break;
case 50: / / 2
for (int lol = 0; lol <6; lol + +)
patterns [az] [lol] = dummy_array [29] [lol];
break ;
case 51: / / 3
for (int lol = 0; lol <6; lol + +)
patterns [az] [lol] = dummy_array [30] [lol];
break;
case 52: / / 4
for (int lol = 0 , lol <6; lol + +)
patterns [az] [lol] = dummy_array [31] [lol];
break;
case 53: / / 5
for (int lol = 0; lol <6; lol + +)
patterns [az] [lol ] = dummy_array [32] [lol];
break;
case 54: / / 6
for (int lol = 0; lol <6; lol + +)
patterns [az] [lol] = dummy_array [33] [lol];
break;
case 55: / / 7
for (int lol = 0; lol <6; lol + +)
patterns [az] [lol] = dummy_array [34] [lol];
break;
case 56: / / 8
for (int lol = 0; lol <6; lol + +)
patterns [az] [lol] = dummy_array [35] [lol];
break;
case 57: / / 9
for (int lol = 0; lol <6; lol + +)
patterns [az] [lol] = dummy_array [36] [lol];
break;
case 58: / / two points
for (int lol = 0; lol <6; lol + +)
patterns [az] [lol] = dummy_array [38] [lol];
break;
case 59 / / semicolon
for (int lol = 0; lol <6; lol + +)
patterns [az] [lol] = dummy_array [78] [lol];
break;
case 60: / / lower
for (int lol = 0; lol <6; lol + +)
patterns [az] [lol] = dummy_array [91] [lol];
break;
case 61: / / same
for (int lol = 0; lol <6; lol + +)
patterns [az] [lol] = dummy_array [79] [lol];
break;
case 62: / / higher
for (int lol = 0; lol <6; lol + +)
patterns [az] [lol] = dummy_array [90] [lol];
break;
case 63 / / mark
for (int lol = 0; lol <6; lol + +)
patterns [az] [lol] = dummy_array [42] [lol];
break;
case 64: / / chess
for (int lol = 0; lol < 6; lol + +)
patterns [az] [lol] = dummy_array [89] [lol];
break;
case 91: / / [
for (int lol = 0; lol <6; lol + +)
patterns [az] [lol] = dummy_array [80] [lol];
break;
case 92: / / bar inveritda
for (int lol = 0; lol <6; lol + +)
patterns [az] [lol] = dummy_array [81] [lol];
break;
case 93: / /]
for (int lol = 0; lol <6; lol + +)
patterns [az] [lol] = dummy_array [82] [lol];
break;
case 94: / / useful
for (int lol = 0; lol <6 , lol + +)
patterns [az] [lol] = dummy_array [86] [lol];
break;
case 95: / / underline
for (int lol = 0; lol <6; lol + +)
patterns [az] [lol] = dummy_array [ 83] [lol];
break;
case 96: / / robot
for (int lol = 0; lol <6; lol + +)
patterns [az] [lol] = dummy_array [88] [lol];
break;
case 124: / / pipe
for (int lol = 0; lol <6; lol + +)
patterns [az] [lol] = dummy_array [84] [lol];
break;
case 126: / / caret
for (int lol = 0; lol <6; lol + + )
patterns [az] [lol] = dummy_array [87] [lol];
break;
default:
for (int lol = 0; lol <6; lol + +)
patterns [az] [lol] = dummy_array [92] [lol];
break;
}
}
}
}
display_word (1, patterns, array_turn, 15); / / call the function with the arguments (loops = 1 = word_print patterns, num_patterns = array_turn, delay_langth = 15)
array_turn = 0; / / clear array_turn variable
}
}
/ / display_word (1, patterns, 43,15);
/ / calls to the function display_pattern use int loop = 15 (if you make more loops the pattern will scroll slower).
latchOn void () {
bitset (PORTB, latchPinPORTB); / / set latch bit to 1 (set)
}
void latchOff () {
bitClear (PORTB, latchPinPORTB); / / set latch bit to 0 (reset)
}
void setupSPI () {/ / set all records for SPI communication
byte clr; / / initialize
SPCR | = ((1 << SPE) | (1 << MSTR)) / / enable SPI as master
/ / SPCR | = ((1 << SPR1 ) | (1 << SPR0)) / / set prescaler bits
SPCR & = ~ ((1 << SPR1) | (1 << SPR0)) / / limpaos bit prescaler
clr = SPSR; / / clean the SPI status reg
clr = SPDR; / / clear the reg date of SPI
SPSR | = (1 << SPI2X); / / set prescaler bits
/ / SPSR & = ~ (1 << SPI2X) / / clean prescaler bits
delay (10); / / small delay
}
spi_transfer byte (byte data)
{
SPDR = data; / / start transmission
while (! (SPSR & (1 << SPIF))) / / waits for the end of transmission
{
};
return SPDR; / / returns the bayte received, do not need it
}
/ / END OF COMPILÇÃO
[/code][/code]
/ *
the display shows # matrix
This example is a public domain code.
/ / end definition of symbols
please find all three page of code and joint it
Hi, when you were developing this code, did any of it work.
In other words, did you start this project a section at a time, testing it as you developed the program, or is this one that you have found or written without doing it in stages.
Have you been able to load any sketch to the arduino without this error?
By the looks of the start of the sketch it is someone else code, so have you had any coding experience.
Tom...
thankyou sir for help me and timely reply me i shortout this fault actually i follow this web site project
and i was using wrong coding thats why i get error ok thanks and if any types of problem come in future for this project related so i take your help
here in india yesterday was Diwali Festival
so Happy Diwali to you
Hi, well that will do it. lol.
Happy Diwali to you too mate.
Tom....
Can u please give me program for 24×6 led scrolling program