Pages: [1]   Go Down
Author Topic: I have a led display banner. I need Send ascii data with rs232 to displ banner.  (Read 2215 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 13
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi!

i have a led display banner. I used windows software and i write some letter but i wanna edit it with arduino...

How can i send ascii data with TX pin to display banner?

I have to send 255, 254, 0, 100, 200, 95, 1, 1, 200, 43, 10, 1, 77, 117, 115, 108, 117, 32, 89, 252, 107, 115, 101, 107, 116, 101, 112, 101, 200, 253 code to banner.

I write:

#include <SoftwareSerial.h>
#define rxPin 0
#define txPin 1


SoftwareSerial swSerial =  SoftwareSerial(rxPin, txPin);

void setup()  {
  pinMode(rxPin, INPUT);
  pinMode(txPin, OUTPUT);

  swSerial.begin(19200);
  char sounds[] = {255, 254, 0, 100, 200, 95, 1, 1, 200, 43, 10, 1, 77, 117, 115, 108, 117, 32, 89, 252, 107, 115, 101, 107, 116, 101, 112, 101, 200, 253};
  Serial.print(sounds);
  delay(10);
}

void loop() {

   }
 


its accepted this code but never changed...
Logged

United States (Texas)
Offline Offline
God Member
*****
Karma: 3
Posts: 525
Arduino socks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

try this
Code:
  char sounds[] = {255, 254, 0, 100, 200, 95, 1, 1, 200, 43, 10, 1, 77, 117, 115, 108, 117, 32, 89, 252, 107, 115, 101, 107, 116, 101, 112, 101, 200, 253};
void setup()  {
  Serial.begin(19200);



for(int i = 0; i <=30;i++)
{
Serial.print(sounds[i],BYTE);
}
}

void loop() {

   }
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 13
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ok will try tonight
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8601
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You will need a value delimiter if all the values are going to be different lenghts.

Code:
Serial.print(sounds[i],BYTE);
Serial.print(',');

______
Rob



Logged

Rob Gray aka the GRAYnomad www.robgray.com

0
Offline Offline
Newbie
*
Karma: 0
Posts: 13
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i programmed with vb6. its working but when isend this ascii code its not working.

VB6 code:

    ComPort = 1
    ComDelay = 20
    ComTimeOut = 3
    ComBaud = "19200"
    ComParity = "N"
    ComDataBits = "8"
    ComStopBits = "1"

    '-/- Open ComPort
    If Open_Port = False Then GoTo End_Send
    '-/- Check ID
    Sleep ComDelay: MSComm.Output = Chr$(255)               'Uyandırma İşareti
    Sleep ComDelay: MSComm.Output = Chr$(254)               'Hazır Komutu
    Sleep ComDelay: MSComm.Output = Chr$(0)                 'Device ID
    '-/- Writing Animation
    Sleep ComDelay: MSComm.Output = Chr$(100)               'Animasyon Transfer Komutu
    'Font Size
    Sleep ComDelay: MSComm.Output = Chr$(200)               'Komut İşareti
    If xSize = 5 Then
        Sleep ComDelay: MSComm.Output = Chr$(95)            'Efekt  (5x7 Pixel Yazı Boyutu)
    ElseIf xSize = 7 Then
        Sleep ComDelay: MSComm.Output = Chr$(97)            'Efekt  (7x7 Pixel Yazı Boyutu)
    End If
    Sleep ComDelay: MSComm.Output = Chr$(1)                 'Süre/Hız
    Sleep ComDelay: MSComm.Output = Chr$(1)                 'Tekrar
    'Shift Left
    Sleep ComDelay: MSComm.Output = Chr$(200)               'Komut İşareti
    Sleep ComDelay: MSComm.Output = Chr$(43)                'Efekt
    Sleep ComDelay: MSComm.Output = Chr$(10)                'Süre/Hız
    Sleep ComDelay: MSComm.Output = Chr$(1)                 'Tekrar
    'İçerik (Numara)
    For i = 1 To Len(xText)
        Sleep ComDelay: MSComm.Output = Mid$(xText, i, 1)   'Her Karakter İçin 1 Byte Veri
    Next
    'Animasyon Sonu
    Sleep ComDelay: MSComm.Output = Chr$(200)               'Komut İşareti
    Sleep ComDelay: MSComm.Output = Chr$(253)               'Veri Gönderimi Sonu
    '-/-
    Close_Port


i wanna send data with ethernet shiled. i can read data on net and send to rs232 but not working..
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 13
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Please answer me? i need to send ascii code with arduino to rs232 like this.

VB6 code:
    Sleep ComDelay: MSComm.Output = Chr$(255)
    Sleep ComDelay: MSComm.Output = Chr$(254)
    Sleep ComDelay: MSComm.Output = Chr$(0) 
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8601
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Are you saying that the data is not reaching the Arduino?

If so let us look at the Arduino code.

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

0
Offline Offline
Newbie
*
Karma: 0
Posts: 13
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i use this code. i am sending data but not changing my led banner. i showed vb code when i send code with vb its working.



char sounds[] = {255, 254, 0, 100, 200, 95, 1, 1, 200, 43, 10, 1, 77, 117, 115, 108, 117, 32, 89, 252, 107, 115, 101, 107, 116, 101, 112, 101, 200, 253};
void setup()  {
  Serial.begin(19200);



for(int i = 0; i <=30;i++)
{
Serial.print(sounds,BYTE);
}
}

void loop() {

   }
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8601
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Your first problem is that you're not sending any of the array bytes, exactly what

Serial.print(sounds,BYTE);

sends I'm not sure (probably the lower half of sound's address or something).

You need to index into the array, and as there are only 30 elements in the array use < 30, not <=30

Code:
for(int i = 0; i < 30;i++)
   {
   Serial.print(sounds[i],BYTE);
   }

EDIT: I just noticed that weirdo told you this days ago.

______
Rob


« Last Edit: February 28, 2011, 11:00:08 am by Graynomad » Logged

Rob Gray aka the GRAYnomad www.robgray.com

0
Offline Offline
Newbie
*
Karma: 0
Posts: 13
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i tested it. i want to tell you. i am not sending data to pc. i am sending to led banner. do i must to use max232 or other chip? when i send data with pc serial port its working but when i sen data with Arduino its doesnt work.
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8601
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
do i must to use max232 or other chip? when i send data with pc serial port its working but when i sen data with Arduino its doesnt work.
That would imply that maybe you do need a MAX232, in which case you should NOT be plugging the display into an Arduino.

Don't you have any specs on the display or a scope to look at the signals.

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

0
Offline Offline
Newbie
*
Karma: 0
Posts: 13
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i didnt see any character in led banner.
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8601
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry musluyuksektepe but you can't just keep saying it doesn't work. We need technical details of the display.

______
Rob
 
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Pages: [1]   Go Up
Jump to: