I can get everything working except turning the pin 6 LED on and off.
I've attempted to configure my MKR1000 along with the StandardFirmataWifi sketch and a simple Visual Studio 2015 app to integrate via WiFi network. The VB app buttons are live but just don't have any effect on pin 6.
The project instructions are from here and modified to use WiFi using this YouTube video here.
I've measured the voltages on pin 6 when selecting the on/off buttons but nothing registered on the board. I loaded the board with the blink LED example sketch and that did work in that the LED (modified to pin 6) did actually blink on and off.
As far as I can tell, I've followed instructions to the letter but must have missed something in my environmental setup that wasn't covered.
Please advise. ...and more info available on request above that provided below.
Once again, this is a real show stopper and would appreciate advice on how to fix this problem.
I'm using...
Windows 10 (64 bit) with VS Community 2015. Arduino IDE 1.6.10 Hourly build with following labraries Firmata 2.5.3 and WiFi101 0.9.1. The sketch is StandardFirmataWifi configured with a static IP and port 3030
The VB app builds cleanly and fires-up with on/off buttons that respond. ...and the MainPage code is provided below:
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using Microsoft.Maker.Serial;
using Microsoft.Maker.RemoteWiring;
// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409
namespace RobsBlankProject
{
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class MainPage : Page
{
IStream connection;
RemoteDevice arduino;
public MainPage()
{
this.InitializeComponent();
connection = new NetworkSerial(new Windows.Networking.HostName("192.168.1.233"),3030);
arduino = new RemoteDevice( connection );
connection.ConnectionEstablished += OnConnectionEstablished;
connection.begin( 115200, SerialConfig.SERIAL_8N1 );
}
private void OnConnectionEstablished()
{
var action = Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, new Windows.UI.Core.DispatchedHandler(() =>
{
OnButton.IsEnabled = true;
OffButton.IsEnabled = true;
}));
}
private void OnButton_Click(object sender, RoutedEventArgs e )
{
arduino.digitalWrite(6, PinState.HIGH);
}
private void OffButton_Click(object sender, RoutedEventArgs e )
{
arduino.digitalWrite(6, PinState.LOW);
}
}
}
A copy of part of the manifest file is...
<Capabilities>
<Capability Name="internetClient" />
<Capability Name="privateNetworkClientServer"/>
<Capability Name="internetClientServer"/>
</Capabilities>
Any reason I am seeing two threads of this post ?
One post is for WiFi through to Windows Remote Arduino Exp app, and this one is to a VB 2015 app. Guess they're pretty similar and the problem seems to be related. In fact, I loaded and built the VB project from Stuff with Kirby (who got it working) but still have the same problem. I've requested his Arduino IDE sketch to compare the config.
Guess it may be appropriate to merge these two posts and am happy if the forum admin guys do just that.
Is it possible that I just have a dodgy board?
I have been successful in running the Blink sketch to blink pin 6 LED. This, of course, is connect via USB.
I have been successful with the modified (i.e. Changing to pin 6 and providing WPA login details) SimpleWebServerWiFi sketch WITH the USB attached. i.e. I appear to be successful in connecting to the board as the serial monitor states...
SSID: BentleyRS-House
IP Address: 192.168.1.54
signal strength (RSSI):-45 dBm
To see this page in action, open a browser to http://192.168.1.54
...and the browser page
Click here turn the LED on pin 6 on
Click here turn the LED on pin 6 off
...does turn the pin 6 LED on and off. ...BUT only with the USB cable attached.
However, I have not been successful when using the same modified SimpleWebServerWiFi sketch without the USB but with a fully charged LiPo battery connected (measured 4.07v on the boards terminals while battery connected). i.e. Starting with the USB and battery connected to the board, I could set the LED on or off. On leaving the LED on, and then removing the USB the LED stayed on but I couldn't use the browser to change it on or off. It appeared to have lost WiFi connectivity (if it ever had it).
On reconnecting the USB, the board was unresponsive - the serial monitor was static, no response to resetting the board with the onboard switch. I had to re-upload the sketch to get it working again.
Now surely the above tests indicate that there's some problem with the wifi chip on this board, and I'd appreciate some feedback as to whether there's anything else I can do to confirm this? ...as I'm just going around in circles here.
If there's a known problem with the boards hardware, then I'd like to know about it and whether I can simply get a replacement
There are a few threads (inc mine) with regards the possible unreliable serial aspect of the MKR.
So you are not alone in that regards.
Seen quite a few issues myself but ruled out the serial side when I deactivated all serial commands and ran it and the board still randomly fails to respond sending data to thingspeak. (2 hrs to 2 days)
Also ruled out the WiFi chip by running an RTC sketch that only output to serial and did not require it and still it randomly failed.
Am pretty sure its a deeper issue.
Do yourself a favour and check out some of the other posts regarding the MKR as it may save you some time trying to resolve a known issue with no current fix.
There is also a thread in the WiFi101 section on this issue too.
IMHO they rushed this board out.
I thought this section of the forum would have gained traction by now but its pretty quiet in here.
Thanks BallScrewBob. I'll have a look at the threads that you mention. So far, I've not been impressed with this product having spent literally days assuming it was something that I'd done or not done. ...but now I'm using the standard sketches that come with the IDE then I start getting suspicious that there's a problem with this product. I may still be wrong as I'm not an expert in this field but if my experience is anything to go by then I can see a lot of novice builders being put-off and going with the older products.
Let you know how I get on as I've just requested a replacement board.
I feel for you.
Have spent more than 60 hours "hands on" trying to put this issue to bed with no luck at all despite the best efforts of others here who have been very helpful in trying.
Also Win 10 seems to cause its own set of issues with Arduinos so if you have the ability to try other computers (OS) that might be worth a shot too.
I too am having this issue. Before the boards were released for sale I could use the standardfirmatawifi sketch and connect with the app. I could also connect with my own program. Now neither work.
StuffWithKirby here again. I got it working On my MKR1000. I have the sketch StandardFirmataWifi loaded, I am using Arduino IDE 1.6.8, WiFi101 0.8.0, and Firmata 2.5.2
So it appears that a newer version of one of these is breaking the feature.
Edit: it appears that WiFi101 0.9.1 breaks it, 0.9.0 worked fine
StuffWithKirby got it right, but I found that I had to use Firmata 2.5.2 for IDE version 1.6.8 and 1.6.9 but it did work with Firmata 2.5.3 in The Hourly Build (7th July) IDE with WiFi101 0.9.1. ...so guess it's been a recognised problem (listed where?) and fixed accordingly.
I suspect that I made a mistake when testing with the Hourly Build (7th) IDE in that I probably (accidentally) used the Firmata example sketch StandardFirmataWiFi from IDE 1.6.9. Sorry if that's confused things a bit. From now on, every time I use a different IDE I start my example sketch config from scratch after having uploaded the appropriate library files.
I can imagine that it took a few hours for StuffWithKirby to test the options as that's what it took me to re-check my own environment. ...so a real big thanks to him for identifying the problem.
Hmm, s'pose I'd better eat some humble pie and recind my request for a replacement board.
Glad you got yours fixed.
I don't use the firmata and even regressing it doesn't fix this one as it still fails.
Props to StuffWithKirby
He should open an issue about it on github to get it fixed permanently.