Go Down

Topic: How can i send data to led banner? (Read 1 time) previous topic - next topic

musluyuksektepe

Feb 28, 2011, 11:50 pm Last Edit: Feb 28, 2011, 11:52 pm by musluyuksektepe Reason: 1
Hi! its my second question.

i have a led banner. i send data to it with vb6 or python its working.

my python code:
# -*- coding: utf-8-*-
import serial, time
ser = serial.Serial('COM1',19200)
ser.parity = 'N'
ser.bytesize = 8
ser.stopbits = 1
ser.timeout = 1
beklemesuresi = 0.2

try:
#yazmaya başla
    message = raw_input("Mesaj girin: ")
    databasla = [255,254,0,100,200,95,1,1,200,43,10,1]
    print "Datalar gonderiliyor"
    for x in databasla:
        ser.write(chr(x))
        time.sleep(beklemesuresi)
#yazmaya başla
#Mesaj
   
    for ch in message:
        mesaj = chr(ord(ch),)
        ser.write(mesaj)
        time.sleep(beklemesuresi)
#Mesaj
#yazmayı bitir
    databitir = [200,253]
    for x in databitir:
        ser.write(chr(x))
        time.sleep(beklemesuresi)
#yazmayı bitir
    ser.close()
# Hata oluşursa
except IOError:
    print "Hata olustu"

my arduino code:
int data[] = {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);}


void loop()
{
for (int i = 0; i < 30; i++){
   Serial.print(data);
   delay(30);
   }


  Serial.end();

}


How can i send data with arduino like python?
Do i have use max232 or other chip?
:smiley-roll:

Grumpy_Mike

Sorry you will have to speak up.
Could you try using a larger type face.


Graynomad

musluyuksektepe there's no point asking the same question on another forum, we've given you examples of code that should work but you seem to constantly ignore requests for information.

We still need the info about the display, otherwise there's little point continuing.

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

musluyuksektepe

i use 18f452 series microchip on display. its working 19200 and send data with 19200 but i think maybe its not same.

Grumpy_Mike

Quote
i dont understand!


The use of large type face is considered very rude.

Quote
i use 18f452 series microchip on display.


It matters not what the controlling micro is, without information on what the display actually is then no one can help you.

Go Up