Arduino node working now?

Hi there,


I was so happy to see the new Dynamo version out - hoping that the arduino node will work again.


It seems that is does not - anyone having the same experience?



Or do I have to give more attention to the EXEC connector on the arduino node than I thought?



Best, Boris.




Hi Winston,



I added an Arduino Write node recently and it can write out whatever you want.


Basic idea is there is an Arduino node responsible for setting up the COM serial connection. There is a Timer / Evaluation node that 'ticks' every n number of milliseconds, then there are Arduino Read and Arduino Write nodes. Both of these deal with strings. The Read node reads a whole text line coming 'down the line' from the Arduino sketch, it dumps out a string that you can parse with other string nodes. The Write Node pushes whatever data back 'up the line' to the serial port and the listening Arduino Sketch.



I'm almost done the new build. I got stuck in 'Dll Hell' last night and then today have been tied up with real work, closing in on the issue i think though!



-matt

Matt,
Nice video and thanks again for the quick response/attention to the thread! Please email me a new installer at your earliest convenience (the previous ones have been working just fine for me, I'm running Vista 32bit). For some reason I was having trouble sending a PM through the Vasari site.


wkahn@usc.edu


Thanks,
Winston Kahn


PS As you are on a roll with Arduino... a node/component that allows you to write values to the UNO and thus control a servo motor would be really useful and greatly appreciated.

1 Like

Hi Winston,



This works just fine in the new build, see video I cut tonight: http://www.youtube.com/watch?v=IyLq6ZnHzDA



PM me your email and I'll send you a preview version of the new build.



-matt

Winston, I got your example working on my machine last night but have been tied up today with 'real' work. Will post some updated screenshots and videos in a blog post tonight hopefully.



BTW I was hacking this weekend in the evenings. I cut these videos of new dynamo features:


- ardiuno driving dynamo http://www.youtube.com/watch?v=VidwY8Ki4ZQ


- an iPad app talking directly to drive Dynamo http://www.youtube.com/watch?v=DrXZvui4aPg



-matt

Matt,
If you could make me an installer for your most recent version, I'd greatly appreciate it. I'm still running MS Vista 32bit and the installers that you have created thus far have worked just fine. Thanks very much for giving my comment your attention.

Winston

Hi Winston,



I have the arduino nodes working much more robustly in the dev version on github now. Look for a new blogpost later on this. Unless you are building the source I don’t believe you have that version. I can make you an installer if you’d like to test out the newest code.



I’ll look at your example later tonight.



-Matt

Hi Ian and Boris,



I'm running Vasari Beta 2 and Vasari_Beta1-0_WIP_Dynamo_Add-In_20121130



Attached is a zip file with some screen grabs describing my test project as well as a .dyn, .rfa and .ghx file for Dynamo/Vasari and Grasshopper respectively.



After skimming over the above, I know that I am receiving photoresistor values from Analog A0 on COM3 as demonstrated in Grasshopper, and get sample feedback of "284,281,278,275,271,267,1,0,0,eol" when I do a Serial Monitor check from the Arduino software with nothing else running.



I thought at first that maybe the Arduino node was 'closed' as there is no boolean toggle as found in a way older previous version of Dynamo which I've screengrabbed. However, I'm convinced that's not the case after looking at the dynArduino.cs file Matt updated on GitHub. It also appears that Matt changed the watch value to a string rather than a parsed number, which might give me back the values I've listed above, when there is an updated release with those changes.



Thoughts?

Boris,


Just saw this reply. Sorry. I haven't figured out how to make this silly forum email me when I get replies. Are you saying that your arduino node doesn't get any data at all? Can you confirm that it is on COM3 or COM4 and that you've set the node to look at whichever COM port it needs?



I'll take a look at your example and let you know. It sounds like different sensors/actuators are providing different serial values, and it will be up to the user to deal with the output in a sensible way



i

Hi Ian


Thank you again for your kind reply.



I am still not able to get the arduino node (better the attached watch node) to show something.


The goal is to develop an interactive model (family including parameters) inside Revit on one hand and a sensor driven (by example arduino) real model on the outside.


Wouild be nice if both models could talk to each other and their parameters.



To actually check if we could somehow use the Arduino node I followed your suggestion and used the attached Arduino script (basis serial read) togehther with a real basic Dynamo file.


The seriel monitor is writing with a delay op 1 second numbers between 0 and 10...
I just hocked up an adjustable resitor (potentiometer) to pin A0.


Why is there just no response?



Both files are attached.



Otherwise we have to think more complicated to follow your sensor idea (your latest post) by reading files or web pages produced by Arduino or to write our own C# programm to read the data from the serial port and to connect them with the database of Revit. I just liked the simple idea of Dynamo.



Best, Boris.







We alredy thought about writing our own arduino/Revit Database C# pr







Hi Boris,


Glad you're going to play with the Arduino node. It was working for Matt and I when we released the newest build. Just to be sure, did you set the Arduino node to the correct COM port. You can do this by right clicking on the node and selecting a port from the contextual menu. Also, to start, set the execution interval to a larger value, like 3000, to make sure you're not over-clocking the node.


It could also be that the data coming down the serial connection is somehow formatted differently than my very simple tests. I'm not Arduino expert. I just made the Arduino node using the AnalogReadSerial example sketch from Arduino. Can you give me an example line of output from your arduino. You can use the "Serial Monitor" in the Arduino application to get this.


Also...I know, there seem to be a lot of alsos here :)...remember that the values coming out of the devices are not normalized. You need to divide by 1024 (the max value) to get something in the range of 0...1.



Please let me know how you get on, and attach any data and workflows that you would like me to take a look at.



Thanks,


ian



Hi Winston,

I think we went to USC together? Did we both have a class w/ Ralph Knowles? How are you?
Anyways, I’m searching for visual programming platforms for Arduino that Dynamo users might recommend, which is how I ended up at this specific thread. I hope you’re well. Take care!