Announcement

Collapse
No announcement yet.

Magic touch arduino

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

  • Magic touch arduino

    I have a 4d systems pro for 7 days test and I use visi ginie see picture.
    I add magic touch for form 1 but how can I read that in my arduino.
    I've tried something but that doesn't seem to work

    Can someone help me?

    Attached Files

  • #2
    Hello,

    If you would like to read a Magic Object in with your Arduino using the ViSi-Genie Library, try using the function AttachMagicByteReader.

    Information on how to use the function including an example which applies to your situation can be found on the Github Page.

    Regards,
    Adem

    Comment


    • #3
      I have tried, but is not working

      Code:
      byte buffer0[255]; // Temporary buffer 0 to store the magic bytes
      byte buffer1[255]; // Temporary buffer 1 to store the magic bytes
      
      void myMagicByteHandler(uint8_t index, uint8_t len)
      {
      // If the magic bytes is coming from MagicObject0
      if (index == 0) {
      // Store the data to buffer0
      for (int i = 0; i < len; i++) {
      buffer0[i] = genie.GetNextByte();
      }
      Serial.println("test");
      }
      // If the magic bytes is coming from MagicObject1
      if (index == 1) {
      // Store the data to buffer1
      for (int i = 0; i < len; i++) {
      buffer1[i] = genie.GetNextByte();
      }
      }
      }

      Comment


      • #4
        Hello again,

        Would you be able to send your ViSi-Genie Project through File->Zip Project in Workshop 4, and your Arduino file.

        Also can you clarify what you mean by 'not working'? Are you able to see the reported messages, and/or are you perhaps getting the wrong values/no values from the magicbytes?

        Regards,
        Adem

        Comment

        Working...
        X