• Products
    • Isadora
    • Get It
    • ADD-ONS
    • IzzyCast
    • Get It
  • Forum
  • Help
  • Werkstatt
  • Newsletter
  • Impressum
  • Dsgvo
  • Press
  • Isadora
  • Get It
  • ADD-ONS
  • IzzyCast
  • Get It
  • Press
  • Dsgvo
  • Impressum
FORUM

Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags

    How to see multiple sensors on an Arduino using serial-in watcher?

    How To... ?
    arduino code
    4
    11
    1792
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • DusX
      DusX Tech Staff @trian_glisain last edited by

      @trian_glisain

      Perhaps you want to use 

      Serial.println();

      instead of 

      Serial.print();

      for the data output, that should separate the values (new lines). https://www.arduino.cc/referen...

      Or you could print some type of delimiter between them, so that you can parse them with in Isadroa.

      Troikatronix Technical Support

      • New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
      • My Add-ons: https://troikatronix.com/add-ons/?u=dusx
      • Profession Services: https://support.troikatronix.com/support/solutions/articles/13000109444-professional-services

      Running: Win 11 64bit, i7, M.2 PCIe SSD's, 32gb DDR4, nVidia GTX 4070 | located in Ontario Canada.

      T 1 Reply Last reply Reply Quote 1
      • mark
        mark @trian_glisain last edited by mark

        @trian_glisain said:

        Ok, so I am working on building a wearable sensor that can control media in Isadora. The current hurdle is that the serial in watcher displays the two sensor values as one string of numbers instead of two separate values. I don't know if the issue is in my Arduino code or in the serial in watcher code, maybe both. If anyone could help me solve this it would be greatly appreciated. Relevant pictures and file attached below. 

        The new Arduino Firmata actor might make this super easy by saving you the trouble of writing your own Arduino code. You can get the alpha version in the top post of this thread. There's a lot of discussion about it in the thread, but you should be able to simply read the documentation (firmata-actor-help.html) included with the plugin.

        Best Wishes,
        Mark

        Media Artist & Creator of Isadora
        Macintosh SE-30, 32 Mb RAM, MacOS 7.6, Dual Floppy Drives

        bonemap 1 Reply Last reply Reply Quote 2
        • bonemap
          bonemap Izzy Guru @mark last edited by bonemap

          @mark said:

          Arduino Firmata actor might make this super easy

           I can confirm that the new Arduino Firmata Actor is the simplest way to read multiple sensors from an Arduino Board into Isadora.

          I have undertaken digital and analog sensor reading tests using Standard Firmata configured Arduino Uno and Arduino Micro boards. The only issue appears to be a known one reflected on the Firmata user forums and relates to the bleeding of data/noise across the analog read pins.

          From my tests with the Arduino Firmata Actor and what I understand from Firmata user forum, if your sensors are using the analog pins you may be better off using the Arduino IDE and ‘serial in watcher’ actor.

          Other than that caveat the Arduino Firmata Actor is super efficient for rapid prototyping in Isadora.

          Best wishes

          Russell

          http://bonemap.com | Australia
          Izzy STD 4.2 | USB 3.6 | + Beta
          MBP 16” 2019 2.4 GHz Intel i9 64GB AMD Radeon Pro 5500 8 GB 4TB SSD | 14.5 Sonoma
          Mac Studio 2023 M2 Ultra 128GB | OSX 15.3 Sequoia
          A range of deployable older Macs

          1 Reply Last reply Reply Quote 2
          • T
            trian_glisain last edited by

            Thank you for the replies! I'll give the firmata actor a shot! A follow up question, I am using one of sparkfun's pro micro qwiic connect boards and I wonder if either of you had tried them out and had any issues with the qwiic connect signal. I have an uno as a backup just in case. 

            -Sean

            bonemap 1 Reply Last reply Reply Quote 0
            • T
              trian_glisain @DusX last edited by

              @dusx I'm fairly new to code, so I'll look up delimiters and see if I can figure them out. Thanks for the direction!

              1 Reply Last reply Reply Quote 0
              • bonemap
                bonemap Izzy Guru @trian_glisain last edited by

                @trian_glisain said:

                sparkfun's pro micro qwiic connect boards

                 I have had a quick look at those boards online. You can try one with the Firmata code - if you have time. The Arduino Uno should definitely work with the Firimata actor in Isadora. If the Sparkfun are a newer board the Firmata test application may not recognise them. However, some Sparkfun boards look similar to the Arduino Micro that I have been testing with. The Arduino Micro was not recognised by the Firmata test app but I was still able to use it with the Arduino Fimata Actor in Isadora.

                Best WIshes

                Russell

                http://bonemap.com | Australia
                Izzy STD 4.2 | USB 3.6 | + Beta
                MBP 16” 2019 2.4 GHz Intel i9 64GB AMD Radeon Pro 5500 8 GB 4TB SSD | 14.5 Sonoma
                Mac Studio 2023 M2 Ultra 128GB | OSX 15.3 Sequoia
                A range of deployable older Macs

                T 2 Replies Last reply Reply Quote 1
                • T
                  trian_glisain @bonemap last edited by

                  @bonemap Awesome, thank you!

                  1 Reply Last reply Reply Quote 0
                  • T
                    trian_glisain @bonemap last edited by

                    @bonemap @mark So, I wasn't able to get firmata working on the sparkfun board, but I have it up and running on my Uno. The sensor I am running uses an I2c connection, but I can't figure out why it won't read. I tried addressing pins 18 and 19 to be pullup inputs or i2c outputs, but no change. Any thoughts? 

                    bonemap 1 Reply Last reply Reply Quote 0
                    • bonemap
                      bonemap Izzy Guru @trian_glisain last edited by

                      @trian_glisain

                      Hi,

                      What type/ model of sensor are you attempting to use? 

                      Best wishes

                      Russell

                      http://bonemap.com | Australia
                      Izzy STD 4.2 | USB 3.6 | + Beta
                      MBP 16” 2019 2.4 GHz Intel i9 64GB AMD Radeon Pro 5500 8 GB 4TB SSD | 14.5 Sonoma
                      Mac Studio 2023 M2 Ultra 128GB | OSX 15.3 Sequoia
                      A range of deployable older Macs

                      T 1 Reply Last reply Reply Quote 0
                      • T
                        trian_glisain @bonemap last edited by

                        @bonemap https://learn.sparkfun.com/tut... This is the sensor, I still don't know if firmata will work, but I just got it working with the serial in watcher. Just needed to seperate the values and make them Serial.Println like was suggested above. So the code was this. Then in izzy I just needed a second serial in watcher set to 2. 

                        #include <SparkFun_ADS1015_Arduino_Library.h>
                        #include <Wire.h>

                        ADS1015 fingerSensor;

                        void setup() {
                          
                          Wire.begin();
                          Serial.begin(115200);
                          
                          if (fingerSensor.begin() == false) {
                             Serial.println("Device not found. Check wiring.");
                             while (1);
                          } 
                          
                          fingerSensor.setGain(ADS1015_CONFIG_PGA_TWOTHIRDS); // Gain of 2/3 to works well with flex glove board voltage swings (default is gain of 2)
                        }

                        void loop() {  
                          int data_1;
                          int data_2;
                          data_1 = fingerSensor.getAnalogData(0);
                          data_2 = fingerSensor.getAnalogData(1);
                          Serial.print(1, DEC);
                          Serial.println(data_1);
                           Serial.print(2, DEC);
                          Serial.println(data_2);
                         delay(50);
                          Serial.println();
                        }

                        1 Reply Last reply Reply Quote 1
                        • First post
                          Last post