• this code doesn't work:

    void setup() {
      // put your setup code here, to run once:
    #include <SmartInventor.h>//include library
    void loop() {
      // put your main code here, to run repeatedly:
    SmartInventor.Buzz(200,8);//make some noise-pitch,200,tempo,8
    delay(500);//whait 1/2 a sec
    SmartInventor.Buzz(500,8);//make some noise-pitch,500,tempo 8
    delay(500);//wait 1/2 a sec

    when i try to verify it, i get this error message:

    Arduino: 1.8.5 (Windows 10), Board: "Rokit-SmartInventor-mega32_v2"
    C:\Users\Efraim\Documents\Arduino\libraries\program_the_buzzer\program_the_buzzer.ino: In function 'void loop()':
    program_the_buzzer:8: error: 'SmartInventor' was not declared in this scope
     SmartInventor.Buzz(200,8);//make some noise-pitch,200,tempo,8
    exit status 1
    'SmartInventor' was not declared in this scope
    This report would have more information with
    "Show verbose output during compilation"
    option enabled in File -> Preferences.

  • administrators

    hello @efraim-fleisher it appears you placed the #include <SmartInventor.h> inside of the setup function. It must be placed outside of the setup on the top. Hope this helps.

Log in to reply

Looks like your connection to Robolink community was lost, please wait while we try to reconnect.