UWP Firmata example not working

Would you like to see more information or a tutorial about how to do something with LattePanda? Post requests here!
User avatar
peppe.tumino
Posts: 6
Joined: Tue Jun 14, 2016 2:11 pm

Mon Jul 11, 2016 10:36 am

No news? @lattepanda can we have an update? thanks

User avatar
LattePanda
Site Admin
Posts: 2143
Joined: Wed Jan 20, 2016 9:09 am

Thu Jul 14, 2016 6:35 am

we are currently updating our docs and will have a working version of this published very soon. thank you for your patience and understanding
Enjoy Tinkering with LattePanda ! :lol:

User avatar
cmoetzing
Posts: 17
Joined: Sat May 28, 2016 3:30 pm

Sun Jul 17, 2016 9:41 am

Still waiting...

User avatar
peppe.tumino
Posts: 6
Joined: Tue Jun 14, 2016 2:11 pm

Wed Jul 20, 2016 2:19 pm

a long and detailed documentation ... :D :D

Lutz
Posts: 157
Joined: Mon Apr 18, 2016 4:30 am
Location: Germany, NRW

Wed Jul 20, 2016 4:29 pm

I played a while with an external Leonardo and 2 office PCs with Win7 and Win10... same problems.
I started to believe, that the problem is the USB driver on window side because all examples I tried from arduino are not working more than one time. The same behavior as the firmata sketch. :cry: :cry:

I think, using USB as a connection to an arduino coprocessor was not the best idea... :?

I call myself an experienced programmer on 8051 micros, but the Atmels are new to me and it will be a hard task to me writing something like an USB communication :oops:

OK, dear Lattepanda team, any suggestions or documentations ?

User avatar
LattePanda
Site Admin
Posts: 2143
Joined: Wed Jan 20, 2016 9:09 am

Thu Aug 04, 2016 9:46 am

Enjoy Tinkering with LattePanda ! :lol:

User avatar
srcox
Posts: 13
Joined: Wed Jun 08, 2016 8:03 pm

Fri Aug 05, 2016 12:30 am

Again, this does not address the ability to build and run Universal Windows Programs which rely upon .Net Core and not System.Core as in this code. This code is simply a more comprehensive example of snippets offered in this thread to get Winforms apps working.

The UWP demo programs offered in your DOCS section do NOT work. Can you please provide a timetable as to when this will be addressed?

User avatar
Digioso
Posts: 29
Joined: Mon Jun 06, 2016 10:47 am

Wed Aug 17, 2016 6:55 pm

I'm working on a project based on this to create a fan-controller.

It does seem to work sometimes (and sometimes not) but sooner or later (I have a loop with a 2 sec sleep) I get this error:

Code: Select all

C:\Users\Digioso\Desktop\LattePanda-Development-Support-master\LattePandaFirmata\LattePandaFirmataDemo\LattePandaFirmataDemo\bin\Debug>LattePandaFirmataDemo.exe
LED on:

LED off:

LED on:

LED off:

LED on:

LED off:

LED on:

LED off:

LED on:


Unhandled Exception: System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at LattePanda.Firmata.Arduino.processInput() in C:\Users\Digioso\Desktop\LattePanda-Development-Support-master\LattePandaFirmata\LattePandaFirmataDemo\LattePandaFirmataDemo\Arduino.cs:line 316
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

C:\Users\Digioso\Desktop\LattePanda-Development-Support-master\LattePandaFirmata\LattePandaFirmataDemo\LattePandaFirmataDemo\bin\Debug>
My code I use for this:

Code: Select all

 public static void Main(string[] args)
        {
            Arduino arduino = new Arduino();
            //arduino.pinMode(9, Arduino.PWM);
            arduino.pinMode(13, Arduino.OUTPUT);
            //arduino.analogWrite(13, 0);
            //arduino.digitalWrite(13, Arduino.LOW);
            CTInfo = new CoreTempInfo();
            CTInfo.ReportError += new ErrorOccured(CTInfo_ReportError);
            while (true)
            {
                Console.WriteLine("LED on:\n");
                arduino.digitalWrite(13, Arduino.HIGH);
                Thread.Sleep(2000);
                Console.WriteLine("LED off:\n");
                //RefreshInfo_Elapsed(arduino);
                arduino.digitalWrite(13, Arduino.LOW);
                Thread.Sleep(2000);
            }
        }
In the end I'd like to use pwm.

However I don't see any difference in between how I handle this and how your template its except that you have a GUI where I can click on a button and i simply have a loop.
Or are two seconds wait not enough? I tried it with 10 seconds but that doesn't change anything either.

User avatar
srcox
Posts: 13
Joined: Wed Jun 08, 2016 8:03 pm

Wed Aug 17, 2016 8:23 pm

Digioso,
This is not uwp code. It's fine for console, winforms and wpf applications but NOT UWP. In Visual Studio create a new Uwp app and add the updated class. It will not work.

lattepanda, please when will we get a resolution?

Lutz
Posts: 157
Joined: Mon Apr 18, 2016 4:30 am
Location: Germany, NRW

Thu Aug 18, 2016 4:15 am

@srcox
There are problems with Firmata not only related to UWP.
OK, maybe the title of the thread is not really correct or some posts are off topic.
Or not, because maybe the problem ist related to USB driver and not to VS and/or the type of VS project.

Post Reply