Menu

Anyone know why this will not compile.

Help
lhatch
2017-08-19
2017-08-19
  • lhatch

    lhatch - 2017-08-19

    chip mega328p, 16

    include <UNO_mega328p.h>

    define DIGITAL_13 LED

    define DIGITAL_2 IR

    DIR LED Out
    DIR IR In

    DIM state as bit

    start:
    if IR <> 0 then
    rem gosub toggle
    end if
    goto start
    end

     
  • stan cartwright

    stan cartwright - 2017-08-19

    syntax errors. uno pinout diag http://marcusjenkins.com/arduino-pinout-diagrams/

    #chip mega328p, 16
    #include <UNO_mega328p.h>
    #define LED portb.5
    #define IR portd.2
    DIR LED Out
    DIR IR In
    DIM state as bit
    start:
    if IR <> 0 then
    rem gosub toggle
    end if
    goto start
    end
    
     
  • lhatch

    lhatch - 2017-08-19

    Thanks Stan. PD2 and PB5 from nano. Thanks.

     
  • lhatch

    lhatch - 2017-08-19

    Opps. Works if I flipped the #define parameters, works both ways. Had I/O and equate/label flipped.

     

Log in to post a comment.