No announcement yet.

4d workshop with alarm arduino code

  • Filter
  • Time
  • Show
Clear All
new posts

  • 4d workshop with alarm arduino code

    Hello, I'm trying to test this project (, but I have a few questions about its code:
    1- how did she use pictures as (wakeup, previous.. ) like buttons and from where did she define these references ( 0x0A, 0x01..) isn't this supposed to be related to the reference in the display, like how the forms are defined
    #define FORM0         0x00
    #define FORM1         0x01
    #define FORM2         0x02
    #define FORM3         0x03
    #define SNOOZE        0x09
    #define WAKEUP        0x0A
    #define SET_ALARM     0x01
    #define PREVIOUS      0x04
    #define PAUSE_PLAY    0x05
    #define NEXT          0x06
    #define STOP          0x07
    #define ALARM_HOUR    0x00
    #define ALARM_MINUTES 0x01
    #define VOLUME        0x02
    2- what does this piece of code mean? why all of them are arrays of 9 indexes?

    int play[8]     = {0x7E,0x0D,0x00,0x00,0x00,0xFF,0xF3,0xEF};
    int stoP[8]     = {0x7E,0x16,0x00,0x00,0x00,0xFF,0xEA,0xEF };
    int next[8]     = {0x7E,0x01,0x00,0x00,0x00,0xFF,0xFF,0xEF };
    int prev[8]     = {0x7E,0x02,0x00,0x00,0x00,0xFF,0xFE,0xEF };
    int pause[8]    = {0x7E,0x0E,0x00,0x00,0x00,0xFF,0xF2,0xEF };
    int track[8]    = {0x7E,0x03,0x00,0x00,0x01,0xFF,0xFC,0xEF};

    I attached the complete code below

    Attached Files

  • #2

    I have attached the full code for this project. It is in 2 parts, There is the Genie part for Workshop. If you look at the object inspector and click on Obect, it will give you an insight into how images and buttons are arranged in the Visi-Genie environment.

    In Visi-Genie you can simply click on widgets and UserImage, then click on the object inspector window. An open file dialogue will appear allowing you to select an image from where your images are saved on the computer. Once that is selected you can resize the image and place it where you want. If you look at some of the objects in the example and click on a button for example and then in the object inspector click on events you can see the action assigned to that button. Some will have a direct action within Visi-Genis and some will report to the host, Arduino in this example.

    In the Arduino part there are a list of defines which are friendly names for the reported events or commands from and to the display. The second list of defines is a list of commands purely for the SOMOII MP3 Player. When it comes to sending a PLAY command to the SOMOII it is all those bytes in that array that make up the command so a simple for next loop is all that is required to complete the command.

    I hope this helps.

    Attached Files