Advanced Auto-Calibrating Line Sensor_SLA08
Posted: Thu Jan 29, 2015 1:41 pm
Good afternoon,
According to the user manual of SLA08 in order to get information from the line follow sensor via UART, we have to pull the UEN down and send a packet to LSA08’s UART, which it's for instance "0x01, 0x44, 0x02, 0x47" after that we expect to get the data from the TX line of SLA08.
So according to that I connect the SLA08 module to arduino UNO as shown in the circuit below, and also wrote the following code
to send a set packet to the module and read the data out from SLA08. But, unfortunately I got nothing, Can tell me what is the wrong in the circuit or in the code?!?
Thanks.
According to the user manual of SLA08 in order to get information from the line follow sensor via UART, we have to pull the UEN down and send a packet to LSA08’s UART, which it's for instance "0x01, 0x44, 0x02, 0x47" after that we expect to get the data from the TX line of SLA08.
So according to that I connect the SLA08 module to arduino UNO as shown in the circuit below, and also wrote the following code
- CODE: SELECT_ALL_CODE
#include <SoftwareSerial.h>
SoftwareSerial LSA(2, 3);//2 RX,3 TX
void setup() {
Serial.begin(9600);
LSA.begin(9600);
pinMode(13, OUTPUT);//UEN PIN
}
void loop() {
LSA.print(0x01); //SET packet
LSA.print(0x44); //SET packet
LSA.print(0x02); //SET packet
LSA.print(0X47); //SET packet
digitalWrite(13, LOW);//UEN PIN
Serial.println(LSA.read());
delay(2000);
}
to send a set packet to the module and read the data out from SLA08. But, unfortunately I got nothing, Can tell me what is the wrong in the circuit or in the code?!?
Thanks.