Quantcast

Visual Automatic Coding for Arduino: Visuino System

The Rocketry Forum

Help Support The Rocketry Forum:

ecarson

Well-Known Member
Joined
Mar 21, 2017
Messages
105
Reaction score
10
Quite by accident, while looking for other information on interfacing Arduino with GPS and Bluetooth, I stumbled upon this website. I was dreading learning how to code for the Arduino, but this software made it quite easy. Instead of hours, it took me just a few minutes to make a program, or "sketch" for my Arduino Uno clone. You connect blocks on a design field, and hook them up.

https://www.visuino.com/

The last time I coded something, it was probably 1985 while still at school. I learned Fortran in the mid-1970's, and then Pascal and Basic in the 80's. After that zip. So it has been a long while, and my gray matter is sure not what it used to be. I got the Arduino clone as part of a learners development kit with lots of goodies for $35.

So I ordered a MPU-6050 ($4.50 from a USA supplier on ebay) board a few days ago, and soldered in the header pins. This is the accelerometer/gyroscope module breakout board, that can be used with an Arduino. Then, I downloaded the Visuino program and installed. It is in early development looks like, but I have 30 days to evaluate it before I purchase. What is the purchase price? $10. Yea, I thought that too. It does have a few rough edges, but it worked exactly as advertised. Another $10 gets you a full year of updates and support.

I rigged up the Arduino with the breakout board on the breadboard, and loaded up the Arduino IDE and got it going. Then, following the tutorial program in this video, I got the whole thing operational in less than 30 minutes.

[video=youtube;JbLg2pG6zvo]https://www.youtube.com/watch?v=JbLg2pG6zvo[/video]

Here are some photos. First the breadboard with the Arduino and MPU-6050 all connected. Second, the screen shot showing the block diagram of my system per the video, with the visual scope of the three outputs. I was twisting and turning the breadboard around to see the outputs.

It really was simple, just drag and drop and connect the elements. Then one button compiles and uploads the sketch to the Arduino. Last shot is the sketch code. It is automatically sent to the Arduino IDE and saved. Hit connect, and suddenly you have data from your inertial measurement unit being output.

This is still a bit crude, and needs refinement, but for a codger like me being able to do this in just a few minutes is astounding. I think it has value as a tool for most any individual who wishes to dive into the world of Arduino and breakouts, but wishes to avoid the hassle of hand coding. Several types and variations of boards are supported, with more to be added in the future they say.

The possibilities are quite broad and far-ranging for the rocket instrumentation hobbyist. There are more videos for more devices, and the process was quite painless.

MPU6050Rig01.jpgVisuino01.jpgVisuino02.jpg
 

ecarson

Well-Known Member
Joined
Mar 21, 2017
Messages
105
Reaction score
10
An update here, on further experiments with this system. I guess I made it sound like I was trying to "sell" this program, but I have no connection to the software author whatsoever. It was just my enthusiasm at finding a solution to further my understanding.

Today, I used a second tutorial to generate the diagram and code for simple recording on the accelerometers and gyroscopes. Cross-referencing the block diagram with the generated sketch lets one gain an understanding of what is going on. I modified the text outputs from todays tutorial, putting simple commas between the data outputs. This would let me copy and paste the data into an Excel spreadsheet as comma delimited data, and then use the chart tools to see what happened graphically.

First picture is the new block diagram. Again, basically drag and drop your sensor, and hook up inputs and outputs with the mouse. Export to code, compile, and upload to Arduino. All with simple clicks of the mouse. Second and third pictures are the charts (acceleration on three axes, and gyro rates on three axes respectively). I let the breadboard sit still for 3 seconds, and then picked it up and rotated it around and about.

Now I'm keen to get a solid state or micro-SD recording breakout, and perhaps an Arduino Nano or two. These bits and pieces are quite inexpensive these days.

I've read about others on this forum who develop these sorts of instruments as one board solutions. Understanding how it works is a strong drive in my nature I guess. The "modular" approach is sort of like building blocks I figure. I probably understand less than a 1/10 of 1% of what I'm doing here, but I learn by doing more than anything.

Visuino03.jpgBenchTestChart01A2.jpgBenchTestChart01G2.jpg
 

Attachments

Last edited:

Donnie

Well-Known Member
TRF Supporter
Joined
Mar 6, 2015
Messages
105
Reaction score
10
Thanks for the info. That programming environment looks promising!
 

BDB

Absent Minded Professor
Joined
Aug 22, 2015
Messages
2,184
Reaction score
417
Thanks for posting this. I’m going to try my hand at Arduino this winter. The last time I coded was in BASIC, so this looks like it might be helpful. What Arduino clone kit did you start with?


Sent from my iPhone using Rocketry Forum
 

ecarson

Well-Known Member
Joined
Mar 21, 2017
Messages
105
Reaction score
10
What Arduino clone kit did you start with?
I got this kit from Amazon, a "Super Starter" kit. So far, everything in it works, and it comes with a disk full of instructions
and tutorials. Even though the kit is made in China (of course), the instructions were actually in grammatically correct English.
That is a miracle in and of itself these days.

https://www.amazon.com/gp/product/B01D8KOZF4/?tag=skimlinks_replacement-20

I'm next going to attempt the GPS module interface tutorial, and I will order a data recorder board. One step at time.
 
Last edited by a moderator:

ttabbal

Well-Known Member
Joined
Jan 19, 2009
Messages
1,082
Reaction score
22
Programmers tend to look down on things like this, but as a tool to learn and/or create simple interfaces I think it makes a lot of sense. The code produced tends to be larger than a hand coded solution would be, but if you don't need the code space, so what? And you can always optimize it later as it produces actual code. I like the idea and will look into it for some projects I have in mind. I think my kid will like it too. He's really interested in this sort of thing, but doesn't quite have the attention span yet to do C++.

Even though I can, I like the idea as it makes for quicker development time and probably fewer bugs in the final product produced by pointer and other memory type errors.

Thanks for the post!
 

OverTheTop

Well-Known Member
TRF Supporter
Joined
Jul 10, 2007
Messages
4,901
Reaction score
2,134
Location
Melbourne Australia
Done a lot of programming languages/environments over the years, but not much graphical. My experience has been that if you think like a regular computer programmer then the graphic stuff can be a bit peculiar. You can mostly (probably completely) accomplish all you could using a regular piece of code, but getting your head around the graphical environment is a bit of a paradigm shift. Once you are into the groove it is ok.

I suspect it is a bit like using a PC verses using a Macintosh. One is easier for non-programmers to use.
 

snrkl

Well-Known Member
TRF Supporter
Joined
Apr 11, 2017
Messages
1,365
Reaction score
200
I suspect it is a bit like using a PC verses using a Macintosh. One is easier for non-programmers to use.
Roflmao - I see what you did there OTT - open troll bait if ever I saw it!! 😜 I like the way you've left it to interpretation as to which is which, in case anyone from either camp with an axe to grind wants to jump in guns blazing!!

Ok - enough of the mockery segue from me - back to the scheduled thread:

We've got code builders built into our networking software to help people get started with our TrafficScript language - it has shown itself to be very useful to help people get started - I like the look of this for arduino...

To the OP: nice find and thanks for sharing!
 

OverTheTop

Well-Known Member
TRF Supporter
Joined
Jul 10, 2007
Messages
4,901
Reaction score
2,134
Location
Melbourne Australia
Roflmao - I see what you did there OTT - open troll bait if ever I saw it!! �� I like the way you've left it to interpretation as to which is which, in case anyone from either camp with an axe to grind wants to jump in guns blazing!!
Not intentional, but I suspect some people will take it that way. We all know that PCs are better than Macs anyway :wink:
 

Winston

Lorenzo von Matterhorn
Joined
Jan 31, 2009
Messages
9,068
Reaction score
1,180
An update here, on further experiments with this system. I guess I made it sound like I was trying to "sell" this program, but I have no connection to the software author whatsoever. It was just my enthusiasm at finding a solution to further my understanding.

Today, I used a second tutorial to generate the diagram and code for simple recording on the accelerometers and gyroscopes. Cross-referencing the block diagram with the generated sketch lets one gain an understanding of what is going on. I modified the text outputs from todays tutorial, putting simple commas between the data outputs. This would let me copy and paste the data into an Excel spreadsheet as comma delimited data, and then use the chart tools to see what happened graphically.

First picture is the new block diagram. Again, basically drag and drop your sensor, and hook up inputs and outputs with the mouse. Export to code, compile, and upload to Arduino. All with simple clicks of the mouse. Second and third pictures are the charts (acceleration on three axes, and gyro rates on three axes respectively). I let the breadboard sit still for 3 seconds, and then picked it up and rotated it around and about.

Now I'm keen to get a solid state or micro-SD recording breakout, and perhaps an Arduino Nano or two. These bits and pieces are quite inexpensive these days.

I've read about others on this forum who develop these sorts of instruments as one board solutions. Understanding how it works is a strong drive in my nature I guess. The "modular" approach is sort of like building blocks I figure. I probably understand less than a 1/10 of 1% of what I'm doing here, but I learn by doing more than anything.

View attachment 329290View attachment 329295View attachment 329296
Very cool. I saw that app covered on Hackaday.io if I recall correctly, visited their site, but then didn't follow up. It would be interesting to see the full code produced by the app and how efficient it is (flash memory used when compiled). Can you zip it and attach it here?
 

ecarson

Well-Known Member
Joined
Mar 21, 2017
Messages
105
Reaction score
10
The generated code has the authors name on it in several places. The root sketch calls several sub-sketches, or subroutines. Subroutines (or what we used to call them anyway) appear to be the authors own copyrighted code as well. Rather than risk violating the authors copyright by publicly posting this full code, I would refer anyone to the website itself.

The program is free to download and try for 30 days. I am still on that first 30 days, but will no doubt cough up the $10+$10 at the end of this month to get the full deal with updates and additions. The website also has links to the YouTube videos that step you though the two processes I did above. The two with the MPU-6050 no doubt of most interest to the rocketeer. Once you register in the website, and download the program, it gives you instructions to get a 30-day free key.

I have no doubt that a highly skilled and experienced programmer could make far more compact and efficient sketches than what is generated by this program, but the time savings are worth the price to me. My 19-year old nephew spends hours and hours, days at a time on his laptop poring over codes he writes. I just remember the hours I spent back in the 1970's thrashing with Fortran, punching cards on one of those old IBM 029 machines. Thunk, thunk, THUNK, clickety, click-click. I showed one of the punched cards I saved to a few young folks, and it was as if I had a Tyrannosaurus Rex fossil in my hands.
 

BEC

Well-Known Member
Joined
Feb 19, 2009
Messages
3,462
Reaction score
459
Location
Auburn, WA
I just remember the hours I spent back in the 1970's thrashing with Fortran, punching cards on one of those old IBM 029 machines. Thunk, thunk, THUNK, clickety, click-click. I showed one of the punched cards I saved to a few young folks, and it was as if I had a Tyrannosaurus Rex fossil in my hands.
I was in college just as we were transitioning from keypunch and cards to entering the code via CRT-based terminals (or thermal printers with a 300 bps modem in the back that you put the receiver of your dorm room’s phone in!)

We have a deck or two of cards around here somewhere - I should show to kids (and grandkids). No doubt the latter will react that way.

On the original post - I’ve not gotten into Arduino stuff but using this approach (which I first saw with the LEGO Mindstorms robotics setups) makes a bunch of sense for those of us who aren’t coding mavens. Thanks!
 

OverTheTop

Well-Known Member
TRF Supporter
Joined
Jul 10, 2007
Messages
4,901
Reaction score
2,134
Location
Melbourne Australia
I still have a manual card punch. Works a bit like a Dymo labeller. Select letter, punch, select letter, punch...

I used it for my year 12 programming back in 1980. It meant I didn't have to go into school to get ready to run a batch.
 

Winston

Lorenzo von Matterhorn
Joined
Jan 31, 2009
Messages
9,068
Reaction score
1,180
The generated code has the authors name on it in several places. The root sketch calls several sub-sketches, or subroutines. Subroutines (or what we used to call them anyway) appear to be the authors own copyrighted code as well. Rather than risk violating the authors copyright by publicly posting this full code, I would refer anyone to the website itself.
Understand. What's the compiled size (flash memory used) of your example MPU-6050 code?
 

ecarson

Well-Known Member
Joined
Mar 21, 2017
Messages
105
Reaction score
10
I bought a package deal of 3 Arduino Nanos for $11 off Amazon. They have same basic processor and memory as the Uno, but in a far smaller and lighter footprint. The USB connector is the next smaller size, and no headers are attached. They do come with the pin headers though, and I soldered them in tonight. The UART serial chip on the Nanos, is a CH340 instead of FTDI as on the Uno. I had to get a special driver to get the desktop to recognize it, but it was little to no trouble.

At any rate, I rigged it up on the breadboard again with the MPU-6050 IMU. I changed the board in Visuino from Uno to Nano, recompiled, and uploaded. Works just like the Uno. The Arduino community indicates that the Uno is more of a development board. The Nano in this case would be my choice to put in a rocket.

My next step will be to get the micro-SD recording card interfaced and operational. Then see if I can make it self contained with a LiPo battery, and perhaps a voltage regulator somewhere.

Here is the Nano setup on the breadboard. Also the complied sketch for the acceleration, and rotation recording setup.

If one reads the bottom of the sketch screen from the first post, you can see that the angle measurement sketch takes 15128 of 32256 bytes available, or 46%. This was off the Uno.

The accelerometer and gyro rate sketch takes 14362 of 30720 bytes available, or 46% again. This was off the Nano.

There appears to be a slight difference in how the memory is partitioned between the two sketches.

NANOpMPU6050.jpgNano MPU6050 AGR.jpg
 

Charles_McG

Ciderwright
Joined
Sep 12, 2013
Messages
2,869
Reaction score
929
Location
SE Wisconsin
It looks a little bit like National Instruments 'Labview'. The Mindstorm reference above makes sense - it uses Labview. Labview and the underlying 'G' language is a bit like C without pointers. Data flow programming takes a little getting used to if you started with code flow programming - but it's pretty intuitive.
 
Top