I am trying to read data from a balance/scales throught a Max232 converter that is connected to a arduino duemilanove w/Atmega 328 board to pin 2rx and 3tx then connected to my computer with USB cable.
I’m trying the following code but do not get any data from the balance.
//rx and tx pins for software serial - connect to laptop
int rx_pin = 2;
int tx_pin = 3;
int baudrate = 9600;
int smoke_toggle = LOW;
int led_toggle = LOW;
int status = LOW;
SoftwareSerial softSerial = SoftwareSerial(rx_pin, tx_pin);
// Connections to balance
// default is 8N1. Need to change to 7N1
// change to 7 data bits
UCSR0C =UCSR0C | B00000100;
reading = Serial.read();
char c = softSerial.read();
I am trying to read data from the balance evry second.
Can someone please advise?