Hi
I am trying to write a bit of code that just sends a single HEX code in a loop whenever the ATTINY85 is powered up.
When I try and compile the code it says the following
ecuSerial.write(H_code());
expression cannot be used as a function
Can someone help correct whatever I have done wrong.
[code]
//Send HEX code 0x5E in a constant loop when ATTINY85 is powered
// These set the ECU SoftwareSerial RX and TX pins, and bit rate
#define RX_PIN 4
#define TX_PIN 3
#define BIT_RATE 100
#define H_code 0x5E
#include <SoftwareSerial.h>
SoftwareSerial ecuSerial(RX_PIN, TX_PIN); // RX, TX, standard polarity logic
void setup()
{
ecuSerial.begin(BIT_RATE);
// pinMode(CONTROL_PIN, INPUT_PULLUP);
}
void loop()
{
ecuSerial.write(H_code());
delay(100);
}
[/code]
Thank You