Announcement

Collapse
No announcement yet.

Tach project Arduino UNO 43PT-AR VisiGenie

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Tach project Arduino UNO 43PT-AR VisiGenie

    Trying to compile Arduino program with genie Write object and keep getting GENIE_OBJ_Angularmeter not declared in this scope. I have commented this out and the program compiles with other genie objects defined. This also occurred when I built up a Coolgauge object. Appreciate any help.

    #include <genieArduino.h>






    int hallsensor = 2; // Hall sensor at pin 2

    volatile int counter;

    unsigned int rpm;
    unsigned int rpm2;

    unsigned long passedtime;

    void isr(){



    //Each rotation, this interrupt function is run twice, so take that into consideration for

    //calculating RPM

    //Update count

    counter++;

    }
    void setup()
    {
    genieBegin (GENIE_SERIAL,9600);
    genieWriteObject (GENIE_OBJ_FORM,0,0);
    pinMode(4,OUTPUT);
    digitalWrite (4, 1);
    delay(100);
    digitalWrite (4, 0);
    //genieWriteObject (GENIE_OBJ_Angularmeter,0,0);

    //Intiates Serial communications

    attachInterrupt(0, isr, RISING); //Interrupts are called on Rise of Input

    pinMode(hallsensor, INPUT); //Sets hallsensor as input

    counter = 0;

    rpm = 0;

    passedtime = 0; //Initialise the values

    }

    void loop()

    { delay(1000);//Update RPM every second

    detachInterrupt(0); //Interrupts are disabled

    rpm = 60*counter;
    rpm2=rpm/2.85;
    counter = 0;
    genieWriteObject (GENIE_OBJ_Angularmeter,0,rpm);
    genieWriteObject (GENIE_OBJ_LED_DIGITS,0,rpm);
    genieWriteObject (GENIE_OBJ_LED_DIGITS,1,rpm2);
    Serial.print("RPM=");

    Serial.println(rpm); //Print out result to monitor

    attachInterrupt(0, isr, RISING); //Restart the interrupt processing
    }

  • #2
    Hello,

    Have a look near the top of the genieArduino.h library file, and you will see the full listing of valid objects. GENIE_OBJ_Angularmeter is not one of them.

    I believe what you are looking for are GENIE_OBJ_ANGULAR_METER and GENIE_OBJ_COOL_GAUGE
    James

    Comment


    • #3
      James,

      Thank you, the GENIE_OBJ_ANGULAR_METER worked and it compiled!!

      Comment

      Working...
      X