Help with compiler error.
mynet43
Posts: 644
I'm trying to write a while loop to wait for a pin to change state. I need to do it without using waitpeq or waitpne.
When I compile the following code, I get a syntax error after the ina.
Please let me know how to write this line correctly.
Thank you for your help.
Jim
This is a snippet of the code...
When I compile the following code, I get a syntax error after the ina.
Please let me know how to write this line correctly.
Thank you for your help.
Jim
This is a snippet of the code...
CON _CLKMODE = XTAL1 + PLL16X _XINFREQ = 5_000_000 RESET = 23 ' define RESET pin LED_PIN = 24 ' Flash LED from this Pn number. P25 = 25 ' set P25 variable to P25 pin CLK_PIN = 26 ' 5 MHz output pin number LCD_PIN = 27 ' LCD Tx Serial Output Pin S1_PIN = 1 ' Sensor S1 on P1 S2_PIN = 2 ' Sensor S2 on P2 S3_PIN = 3 ' Sensor S3 on P3 S4_PIN = 4 ' Sensor S4 PUB main repeat while (ina(S4_PIN) <> 0)' wait for Sensor 4 to trigger
Comments
Thank you! I knew it was something like that