G'day I'm pretty new to the Arduino so this is probably a really simple problem but i cant seam to figure it out myself .
im getting the error msg "error at this point" its refering to this line digitalWrite (BHI =LOW);
im assuming i will get the same msg appear for all my following digitalWrite lines, if somone could steer me in the right direction that would be awesome.
here is my code i'm trying to control my osmc( open source motor controller)
int AHI = 5; // normal I/O pin
int BHI = 3; // normal I/O pin
int ALI = 6; // must be on a PWM I/O pin
int BLI = 4; // must be on a PWM I/O pin
void setup() {
int motor_speed = 51; // a value between 0 and 255
pinMode (AHI, OUTPUT);
pinMode (BLI, OUTPUT);
pinMode (BHI, OUTPUT);
pinMode (ALI, OUTPUT);
}
int motorforward()
{
digitalWrite (AHI = HIGH,60);
digitalWrite (BHI =LOW);
digitalWrite (ALI =LOW);
digitalWrite (BLI = HIGH);
}
int motorreverse () {
digitalWrite (AHI = LOW);
digitalWrite (BHI = HIGH, 60);
digitalWrite (ALI =HIGH);
digitalWrite (BLI = LOW);
}
}
void loop() {
motorforward;
delay (5000);
motorreverse;
delay (5000);
}