@@ -55,7 +55,7 @@ The following commands are implemented:\n \
55
55
56
56
void setup () {
57
57
Serial.begin (115200 ); // Start Console interface
58
- tle9012.init (&Serial2, 2000000 ,RXPIN,TXPIN ); // Initialize driver with 2Mbit
58
+ tle9012.init (&Serial1, 1000000 , 0 , 0 ); // Initialize driver with 2Mbit
59
59
}
60
60
61
61
void loop () {
@@ -136,6 +136,7 @@ void interpretCommand(const char commandbuffer[], uint8_t bufferlength)
136
136
137
137
if (sscanf (commandbuffer," %s" ,cmd) == 1 ) // Read command
138
138
{
139
+ Serial.write (commandbuffer,bufferlength);
139
140
if (!strcmp (cmd," IL" )) // Emulate IL Command (no function because no ring bus mode is supported by this library)
140
141
{
141
142
Serial.println (" IL OK" );
@@ -156,7 +157,12 @@ void interpretCommand(const char commandbuffer[], uint8_t bufferlength)
156
157
iso_uart_status_t status = tle9012.writeRegisterSingle (dev_address, reg_address, data);
157
158
if (status == isoUART_OK)
158
159
{
159
- Serial.println (" OK 8000" );
160
+ Serial.print (" WL " );
161
+ Serial.print (" " );
162
+ Serial.print (dev_address,HEX);
163
+ Serial.print (" " );
164
+ Serial.print (reg_address, HEX);
165
+ Serial.println (" OK 8000" );
160
166
}
161
167
if (status == isoUART_TIMEOUT)
162
168
{
@@ -185,6 +191,11 @@ void interpretCommand(const char commandbuffer[], uint8_t bufferlength)
185
191
iso_uart_status_t status = tle9012.readRegisterSingle (dev_address, reg_address, &data);
186
192
if (status == isoUART_OK)
187
193
{
194
+ Serial.print (" RL " );
195
+ Serial.print (dev_address,HEX);
196
+ Serial.print (" " );
197
+ Serial.print (reg_address,HEX);
198
+ Serial.print (" " );
188
199
Serial.print (data,HEX);
189
200
Serial.print (" OK " );
190
201
Serial.println (" 8000" );
0 commit comments