• 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

    [ANSWERED] Serial Watcher Binary and Arduino

    Hardware
    serial watcher serial port arduino
    7
    12
    2103
    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 @rikimazza last edited by

      @rikimazza said:

      serial.postln(

       Have you tried using Serial.print()
      I don't think it should make a difference, but perhaps some glitch exists in the data sent?
      Can you see any changes in the sent data in the Isadora Monitor Window?

      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.

      R 1 Reply Last reply Reply Quote 1
      • Fred
        Fred @rikimazza last edited by

        @rikimazza one other note, are you sending the value in every update loop in your arduino code? If so it is better to check if the value has changed and only send the value if it is different, you may just be choking the serial port sending data that is not needed.

        http://www.fredrodrigues.net/
        https://github.com/fred-dev
        OSX 13.6.4 (22G513) MBP 2019 16" 2.3 GHz 8-Core i9, Radeon Pro 5500M 8 GB, 32g RAM
        Windows 10 7700K, GTX 1080ti, 32g RAM, 2tb raided SSD

        R 1 Reply Last reply Reply Quote 2
        • liminal_andy
          liminal_andy last edited by

          On occasion and depending on the payload, you may have to use .println() to send the return character in order to get it out of the buffer, or you need to flush the serial buffer altogether when you want to transmit the payload. Many years ago I had a similar issue, and I vaguely recall this being part of my solution.

          Andy Carluccio
          Zoom Video Communications, Inc.
          www.liminalet.com

          [R9 3900X, RTX 2080, 64GB DDR4 3600, Win 10, Izzy 3.0.8]
          [...also a bunch of hackintoshes...]

          1 Reply Last reply Reply Quote 1
          • fubbi
            fubbi @rikimazza last edited by fubbi

            @rikimazza This is not directly helpful for your question, sorry, but I prefer to skip the whole serial route and here is what I'd do

            The best thing to do is really to get a teensy. You can set it up to be a usb midi interface or HID or whatever you want, bypassing all the serial grief.

            Or to get a solid signal from the arduino you can send it as midi to a midi interface. If you get a midi plug and a resistor for like a euro its actually quite easy to send midi (receiving is a bit more complicated).

            That's just my personal preference based on what I feel like dealing with in a performance situation. I rather deal with the note on watcher than the serial in watcher when it comes to sending tiny bits of  data around the stage to one or multiple machines.

            If you dont want to buy a teensy, than all you have to do is this:

            Mac M2 Ultra, 64gb — Berlin

            R 1 Reply Last reply Reply Quote 2
            • N
              nick last edited by

              can you post your Arduino code - just too check there isn't something unusual in it.

              MacBook Pro 11.5.2

              1 Reply Last reply Reply Quote 0
              • R
                rikimazza last edited by

                Thanks very much to all for suggestions. I guess the problem is due to serial communication of the Arduino and serial actor. I solved sending a reset message with a pulse trigger every 3 seconds to the rest input of Serial Actor and it works well. In Arduino I used the internal 10Khom resistor on pin 7 using  INPUT_PULLUP with the following code. When sensor is on the LED also lit so that I can be sure the sensor reacts . 

                void setup() {
                  

                Serial.begin(9600);

                  pinMode(13, OUTPUT);
                  pinMode(7, INPUT_PULLUP);

                }

                void loop() {

                  int b1 = digitalRead(7);

                  if (b1 == LOW) {
                    
                    digitalWrite(13, HIGH); //accende LED interno per testing
                    
                    Serial.println(1,DEC); //Seriale da inviare a ISADORA
                    Serial.println(1);
                  
                  } else {
                    
                    digitalWrite(13, LOW);
                    Serial.println(1,DEC);
                    Serial.println(0);
                    
                    }

                };

                // on isadora edit serial bynary actor -- "1"  value:integer = 4 digits

                N 1 Reply Last reply Reply Quote 0
                • R
                  rikimazza @fubbi last edited by

                  @fubbi wow fantastic!!! thanks for sharing!!

                  1 Reply Last reply Reply Quote 0
                  • R
                    rikimazza @Fred last edited by

                    @fred thanks Fred, yes Arduino is working I use the led to check. Anyway I solved sending periodically a rest message to the Actor and it looks like working well.

                    1 Reply Last reply Reply Quote 0
                    • R
                      rikimazza @DusX last edited by

                      @dusx thanks Dusking. Yes the problem anyway can be solved sending a reset message maybe it can be Arduino with my Mac... but sending a reste periodically to the actor it works and it looks like it is stable too.  

                      1 Reply Last reply Reply Quote 0
                      • N
                        nick @rikimazza last edited by

                        @rikimazza


                        I know you have a workaround, but from this code the suggestion in freds post is correct - the code sends the values as often as the board can - way faster than you need. Adding a small delay in the Arduino code should remove the need to reset the actor, and reduce the work you are asking the computer to do. If you add delay(10); just before the final bracket it would stop for 10 milliseconds each time, and you would only be sending the message slightly less than 100 times a second.

                        MacBook Pro 11.5.2

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