Having added a second Spark Core to my collection, I found that it was becoming a hassle to connect two serial ports to monitor debug information. I decided to have my programs publish debug events to the Cloud. I then turned to my SparkIODotNet linrary to create a Spark Cloud Event Viewer! This way I can run a capture on the event stream for my Cores, specific event names, etc. All in a nice clean GUI.
As the listener is collecting the events, the left most tree view fills with the distinct CoreIDs it sees and the related event names. Selecting a CoreID or EventName will filter the Event List. Selecting an event in the Event List will send it to the JSON Viewer if it is JSON Data.
Right now the code is in protoype/alpha condition. I am working on cleaning it up right now and getting the operation tight. I will certainly be releasing it soon. Keep an eye out here for updates.
I think the reason for this error is that the parameter list you are providing allows for ambiguitiy.
It might be that the docs code snippet predates the addition of a new overload for the constructor.
Thanks. I went for the first option and it works, although it seems to ignore the coreID parameter and trigger for publishes made by everyone of my devices. It’s not a big issue though, since each event has its own CoreID argument and I can use it to identify where the event is coming from.
Dim MyCore As CoreAPI
MyCore = New CoreAPI("token", "core")
MsgBox(MyCore.GetCoreInfo.Name)
Should those 3 lines of code still work? I guess i am missing something because if I run them I get the following error"
SparkIO.WebServices.Exceptions.UsernameOrPasswordIncorrectException was unhandled
HResult=-2146232832
Message=Error in the application.
Source=SparkIO.WebServices
Do I need to add in a username & password somewhere? I don’t see much action on this library since end of 2014 so wondering whether it works so well no changes are needed or whether it might no longer be compatible after some changes from Particle…
I had this same problem, but solved it.
The problem I had was when I called the inital constructor the accessToken and coreID were swapped.
This is how I have it now and I can turn Leds on and off nicely with buttons in c#