Serial in watcher - Binary
-
Hello I am wounding if anyone can help with understand how the serial in watcher works.
I am currently working on a university project, and I have been given the HC-SR04 Ultrasonic sensor to create an interactive project.
I know nothing about coding however I have found this site user full to code the Arduino Getting Started with the HC-SR04 Ultrasonic sensor | Arduino Project Hub.
I now am struggling to understand how this sensor works with Isadora; I have set up the port and have data coming in. In the serial in watcher, I have added value : integer = eol this is the part I really don't understand.
When in Arduino software the distance seems to be accurate but then looking at the serial in water the value is jumping around, and this is the part I am stuck on.
If anyone could help it would be much appreciated :)
-
I'd suggest taking a look at the Arduino Firmata actor as it may be easier to work with than the Serial In Watcher - Binary actor.
If you right-click the Arduino Firmata actor and select the top option "Show Actor Help In Browser" you get a description of what all the inputs and outputs do.
The actor is included in Isadora 4 by default, but if you grab the download from the Add-Ons Page, I think the readme document might have some other helpful hints/resources.
Additionally, the ever-magnificent @bonemap was kind enough to post a detailed setup explanation on the forum here: https://community.troikatronix.com/topic/7643/arduino-firmata-sensor-setup?_=1739300021645
-
-
@milky301 said:
I have added value : integer = eol
You might try:
msg:string={00-FF}
This should at least give you output that looks like what you are seeing in the Monitor Window (use this if your not to view your incoming serial data). This line sets a msg value to all values within the range of Hex values. This is generally my starring point.
-
Hello @dusx
I have attach a viedo of how jumper the values are with both of the codes; this is without anything in front of the sensor. Is this normal? Do I have to add more to Isadrao to get the number more accurate?