Hi Forum.
I am trying to send AT messages using Arduino UNO to my OBDII-UART adaptor board (Sparkfun brand) to my J1850 PWM bus.
Cant seem to get there with the commnands at this stage.
Everything is wired up and I can do whats required using MultiEcuScan and an OBDII adaptor but stuck asking the Uno to send the code. Thanks for any advice.
#include <SoftwareSerial.h>
void setup(){
Serial.begin(38400);
Serial.println("ATZ"); //Reset the OBD-II-UART
delay(2000);
Serial.println("ATS1"); //SAE J1850 PWM Protocol
delay(1000);
Serial.flush(); //Delete any data that may be in the serial port.
}
void loop(){
// Serial.println("ATCP18");
// delay(200);
Serial.println("ATSH18DA60F1"); // Bus Address 18DA60F1
delay(200);
Serial.println("052F559703FF"); // Data
delay(200);
//Serial.flush();
}
Hi awneil. Thank you for your reply.
'Cant seem to get there with the commands at this stage' means I can send the AT commands ok and the Serial Monitor shows the 'ok' responses from everything except the last line which is the data 052F559703FF. that comes back using Serial Monitor as 'NO DATA' however when I monitor what MultiEcuScan outputs I see this 18DA60F1052F559703FF.
Using the AT commands data sheet it says to send the address ATSH18DA60F1 and the data as the next line, so I am stuck at that point.
Using an R3 Uno.
Sparkfun board https://www.sparkfun.com/products/9555
Uno Tx to Sparkfun Rx
Uno Rx to Sparkfun Tx
Uno Gnd to Sparkfun Gnd
Sparkfun J1850 connections and Gnd to OBDII port connections
Sparkfun tutorials I cant seem to find with respect to the J1850 PWM protocol
If you are using the Uno Hardware UART, you can't open the Serial Monitor or else you have three devices sharing the port. Better to use a Mega which has multiple hardware UARTs. One for Serial Monitor, one for you board.
That does not make sense. If your Uno is plugged into your PC so you can communicate with the Serial Monitor, it is using the UART. Or do you mean you are sending the commands to the Serial Monitor without the Sparkfun board connected?
I am sending using the Serial.println commands from which I can see the RX and TX of the Uno and the Sparkfun board illuminate. However now you ask I can also see what I am sending on the Serial Monitor (as my PC is powering the Uno board) at the same time which I find odd ! Why indeed should that happen. I was expecting the commands only to be sent via the Sparkfun. Confusion reigns !