No announcement yet.

Does the Arduino Library Need Updated for Smart Widgets?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Does the Arduino Library Need Updated for Smart Widgets?

    The new Smart Widgets are AWESOME!

    Does the Arduino Libray need to be updated for sending data from an Arduino to a the Gen 4 LCD Displays?

    Normally I use this code on the Arduino to send data to a Cool Gauge:

    genie.WriteObject(GENIE_OBJ_COOL_GAUGE, 0x00, gaugeVal);
    In the Arduino libarary these objects are avaliable but no Smart Widget Objects exist yet.

    Below is what is in the Arduino Library currently:

    // Objects
    // the manual says:
    // Note: Object IDs may change with future releases; it is not
    // advisable to code their values as constants.

    #define GENIE_OBJ_DIPSW 0
    #define GENIE_OBJ_KNOB 1
    #define GENIE_OBJ_ROCKERSW 2
    #define GENIE_OBJ_ROTARYSW 3
    #define GENIE_OBJ_SLIDER 4
    #define GENIE_OBJ_TRACKBAR 5
    #define GENIE_OBJ_COOL_GAUGE 8
    #define GENIE_OBJ_FORM 10
    #define GENIE_OBJ_GAUGE 11
    #define GENIE_OBJ_IMAGE 12
    #define GENIE_OBJ_KEYBOARD 13
    #define GENIE_OBJ_LED 14
    #define GENIE_OBJ_LED_DIGITS 15
    #define GENIE_OBJ_METER 16
    #define GENIE_OBJ_STRINGS 17
    #define GENIE_OBJ_USER_LED 19
    #define GENIE_OBJ_VIDEO 20
    #define GENIE_OBJ_STATIC_TEXT 21
    #define GENIE_OBJ_SOUND 22
    #define GENIE_OBJ_TIMER 23
    #define GENIE_OBJ_SPECTRUM 24
    #define GENIE_OBJ_SCOPE 25
    #define GENIE_OBJ_TANK 26
    #define GENIE_OBJ_PINOUTPUT 28
    #define GENIE_OBJ_PININPUT 29
    #define GENIE_OBJ_4DBUTTON 30
    #define GENIE_OBJ_ANIBUTTON 31
    Do the Smart Objects need to be added the list above in the Arduno library .H file?
    Attached Files

  • #2
    Try adding this:


    We have a new library coming out this week (fingers crossed), which includes the Smart Widgets stuff, but also has a number of other improvements/features.
    We likely will release it as a separate library, so people can choose if they use the original, or the new version, and see how it goes with public testing.
    The aim was to have it out already, but it wasn't to be. Soon!

    Watch this space.


    • #3
      Thanks for the quick reply!

      I added the lines to the .H file.

      Can you give me an idea of what kind of changes / improvements to expect in the new library.

      Wondering if I should hold off on coding my Arduino to LCD Screen project until the new library is released or not since waiting a week is not a problem.

      Keep up the good work over there!


      • #4
        I can tell you the new one should just drop in and you should be able to carry on as you were.

        It handles comms a little better, get a bit faster throughput, isn't so fussy at startup for getting in Sync and staying in Sync, new built in functions to do things like check if the display is connected or not, easy to figure out what form you are on (for optimising comms so objects on the form you are on only get updated, etc), return values for various functions etc. Quite a few new bits and pieces.
        Just keep going as you are, and when this one comes out, just drop it in and carry on.

        We will be releasing it in BETA status to start with, to get some public testing done, and it will eventually take over the current genieArduino as the main library.

        The current library handles software serial a little better than the new one, as Software Serial can only do 1 thing at a time, and the new library tries to multitask. AltSoftSerial can be used on the new one though, where that is required. We will try and keep them both going so either can be used, for a while at least.

        Its in the final stages of internal testing at the moment. Hoping for a release this side of this week.

        It will be coming here:



        • #5
          Thanks for the overview James!

          I like how the scope widget will update even when your on a different form so when you go to the form with the scope widget on it, it's up to date with the most current data.

          With the new library where it will only update the form that is being viewed, would it still keep a Scope Widget updated that is on a form page that is not currently being viewed?


          • #6
            It will do whatever your code tells it to do, basically.
            If you want it to update widgets on other forms, then just write to those widgets as you probably do now.
            The new features allow your host to easily figure out what form the display is on, so it can then make informed choices about what to update and what not to update, but its all based on your code.
            You can do the same thing now, but its just not quite as transparent.