Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 8 Replies) Connecto to Lattepanda (Read 11226 times)
laszlo.frank
Newbies
*
Offline


Posts: 7
Joined: Feb 27th, 2017
Connecto to Lattepanda
Feb 27th, 2017 at 5:35pm
Print Post  
Unfortunately I am new to both VisualMicro and Arduino development in general, so have a couple of questions Smiley

I just have set up my LattePanda and want to start developing simple Arduino apps. However, I do not know how to connect to the Arduino board located on the LattePanda over the network. Reason is, that I do not want to run VS on the small device, instead use my laptop. Is that possible with VisualMicro ? If yes, how ? 

I saw the possibility in VisualMicro to enter an ip address instead of a COM port, just can't figure out how it works and what component is required on the LattePanda to redirect its default COM5 port to some network port to which I can connect to remotely ?

Unless I am mistaken, LattePanda has a built in Arduino Atmega32U4 ( Leonardo ). I guess I have to select this type of board in VisualMicro, too, but can't find it. Is it supported ?

Thanks in advance.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Connecto to Lattepanda
Reply #1 - Feb 27th, 2017 at 5:46pm
Print Post  
Hello,

The IP address upload relates to boards that support it such as Esp8266.

Looking at the documentation for your hardware I think Visual Micro won't be very important.

Visual Micro does what the Arduino IDE is designed to do which is program a micro-controller  with a small c++ program that you write.

Your hardware has a good example of how to use it via remote control. It describes using the arduino firmata library. Then you can write windows, linux, max or web programs to control or read the remote hardware.

http://www.lattepanda.com/docs/#SetuptheArduino
http://www.lattepanda.com/docs/

« Last Edit: Feb 27th, 2017 at 5:46pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
laszlo.frank
Newbies
*
Offline


Posts: 7
Joined: Feb 27th, 2017
Re: Connecto to Lattepanda
Reply #2 - Feb 27th, 2017 at 6:02pm
Print Post  
Thank you for the superfast response !

First off, I've got used to using Visual Studio for development and if possible I insist using it also for Arduino development, this is the reason I am looking at it. On the other hand, you're right that if I am using the firmata library for coding in c# then I won't need VisualMicro.

Secondly, I also have seen and read the LattePanda documentation about remote controlling arduino, but for me it seems quite like local access to the arduino board, directly from the LattePanda computer. At least I can't find any reference in the documentation explaining how to connect over an ip address ? The firmata class library seems to be useful for local application running on the LattePanda itself, is it not . Am I overlooking or missing something ?
« Last Edit: Feb 27th, 2017 at 6:04pm by laszlo.frank »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Connecto to Lattepanda
Reply #3 - Feb 27th, 2017 at 6:07pm
Print Post  
Hi,

Are you asking if you can run an ide on the Arduino Atmega32U4?

The answer is no. If the panada shield is linux then maybe there is a solution documented on the littlepanda site,

Normally this would be a version of the arduino ide running on linux that can program the Arduino Atmega32U4.

You can use Visual Micro if you want to write normal arduino c++ programs with visual studio and then upload them using usb or sometimes IP.





  
Back to top
WWW  
IP Logged
 
laszlo.frank
Newbies
*
Offline


Posts: 7
Joined: Feb 27th, 2017
Re: Connecto to Lattepanda
Reply #4 - Feb 27th, 2017 at 7:07pm
Print Post  
No. What I am asking is how can I use my laptop and Visual Studio on it to write and debug c# applications controlling the arduino board through firmata class library provided by lattepanda. 

I think this is quite a natural approach. Although the lattepanda mini computer is quite fast and runs win10 pretty well, I still do not believe that it is a good idea to install Visual Studio on it. It is not a development machine, but only a machine hosting an arduino board. The app I write - and I mean c# and .net, not an arduino sketch - will eventually be deployed on the lattepanda win10 OS and will interact with the arduino board locally through the aforementioned class library.

But I can't develop and debug such an application on my laptop even if i install firmata class library on it, unless there is mechanism to reach out to the arduino board on the panda. In other words, reach the arduino "remotely". And I assume a logical choice would be leveraging the network to connect to the arduino.

That's all. It seems so evident to me, I wonder why others did not bump into this staff. Or I might have a false view on this whole story...probably I do. But then again, how others do this ? Is really the only way to install VS on the lattepanda ?

Sorry, I see I am rambling from forum topic...
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Connecto to Lattepanda
Reply #5 - Feb 27th, 2017 at 7:20pm
Print Post  
Okay thanks for explaining.

You need to debug two programs at a time.

1) maybe a windows c# or c++ master program
2) the arduino running firmata

1) is described in the panda docs linked above

2)

The arduino you have has limited memory, so normally debug of the arduino code is done with serial print statements or a hardware programmer. All of which require a usb connection with at least one digital pin or serial.

Visual micro can be used to upload the firmata sketch and space allowing visual micro can give you a simple debug alternative to serial print statements. You try the visual micro debugger with a simple sketch and learn how to change the values of variables without needing to stop and reload code. However changing breakpoints and adding watch expressions required code to be re-uploaded. It might or might not be useful but it is an easy way to debug via usb.

Boards like the esp8266 support simple udp net debug as an alternative to serial. Maybe in the future if there are a lot of requests for the panda or if some finds all the info required for udp with the panda then we could look at adding simple debug support.

So you have some simple debug options using serial or digital pins > usb.
  
Back to top
WWW  
IP Logged
 
laszlo.frank
Newbies
*
Offline


Posts: 7
Joined: Feb 27th, 2017
Re: Connecto to Lattepanda
Reply #6 - Feb 27th, 2017 at 7:38pm
Print Post  
Okay, let's say I am content with the services provided by the standard firmata sketch (yes it is sketch that I had to upload to the arduino) and the firmata class library built over it, and therefore I do not want to write any sketch at the beginning. Only write managed c# code using the class library.
 
I guess the only place where I can make use of the firmata class library at runtime is the lattepanda host locally, as the class library will communicate locally with the arduino board.

But I also need to install the class library on my local, development machine (laptop) in order to be able to build an application. Then I deploy the app to the lattepanda and debug it from Visual Studio on my laptop with remote debugging capability built into VS ?

Again, many thanks for you insistent support Tim.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Connecto to Lattepanda
Reply #7 - Feb 27th, 2017 at 7:58pm
Print Post  
I didn't realize the board runs windows 10!! Sorry Smiley

If you can install visual studio on the board (try vs2017 RC because it's a small install with c++ only) then you can install visual micro on the board. 

I do not know if the arduino on the board is mapped as a normal usb/com port but it probably is. In which case you could build programs with visual micro on the board and upload to the arduino. The windows 10 could debug the arduino as per our documentation. 

Can you try to install visual studio and visual micro on the lattepanda ?? I am very interested to know if it works. If it does I can give you free debugger licences as a thank you for testing.
  
Back to top
WWW  
IP Logged
 
laszlo.frank
Newbies
*
Offline


Posts: 7
Joined: Feb 27th, 2017
Re: Connecto to Lattepanda
Reply #8 - Feb 27th, 2017 at 9:49pm
Print Post  
I may have mis-explained the story from the beginning, sorry. So yes, LattePanda runs Win10 with its full functionality (Enterprise x64) and theoritically I can install VS on it. But this is exactly I want to avoid Smiley. Its true though, that I have not tried 2017 yet, only used 2015. But as VS2015 can occupy 5-9GB on disk as well as eat up CPU resources I am little bit afraid. Nevertheless, I'll give a try to VS2017 and let you know the results.

Btw, the arduino board is mapped to COM5 port and I uploaded the firmata sketch with Arduino 1.8 installed on LattePanda using that port. So it works for sure.

My primary goal however, is building C# .NET apps using the firmata library, as I am not very strong in C++, and I think most of the time the library can provide what I need. I also know, however, that when it comes to strict timing or some real-time functionality requirement, I'd better forget .NET.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Connecto to Lattepanda
Reply #9 - Feb 28th, 2017 at 12:45pm
Print Post  
2017 is faster and lighter. However when running both IDEs (2015 and 2017) take less cpu resources than the arduino ide and java.

« Last Edit: Feb 28th, 2017 at 12:45pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint