Permalink
Browse files

Tried to send the arduino messages as integers.

  • Loading branch information...
IAmCoder committed May 31, 2014
1 parent 2378da4 commit e1c0c410ac1df9c089c8b69e972e42bd131066d8
@@ -2253,14 +2253,14 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:Lucid Scribe ThinkGear EEG"
"ProductCode" = "8:{AD588752-24B4-4FF8-92DB-3A96431C2BD7}"
"PackageCode" = "8:{49CBC5A2-6456-439A-A754-549FA5AA117E}"
"ProductCode" = "8:{0F9BCCCD-06A7-4BFB-8D56-1F2C4B1DE328}"
"PackageCode" = "8:{F3B34264-F4DC-45D6-9416-309C50482920}"
"UpgradeCode" = "8:{9B1E2A82-9D73-4675-9717-2311206ABC4E}"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:TRUE"
"ProductVersion" = "8:1.1.1"
"ProductVersion" = "8:1.1.2"
"Manufacturer" = "8:lucidcode"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:http://www.lucidcode.com/Contact"
@@ -664,12 +664,24 @@ private void TriggerArduino()
arduinoPort.BaudRate = 9600;
arduinoPort.Open();

arduinoPort.Write(Device.ArduinoOn);

try
{
byte[] b = BitConverter.GetBytes(Convert.ToInt32(Device.ArduinoOn));
arduinoPort.Write(b, 0, 4);
}
catch (Exception ex)
{ arduinoPort.Write(Device.ArduinoOn); }

int arduinoDelay = Convert.ToInt32(Device.ArduinoDelay) * 60000;
Thread.Sleep(arduinoDelay);

arduinoPort.Write(Device.ArduinoOff);
try
{
byte[] b = BitConverter.GetBytes(Convert.ToInt32(Device.ArduinoOff));
arduinoPort.Write(b, 0, 4);
}
catch (Exception ex)
{ arduinoPort.Write(Device.ArduinoOff); }

arduinoPort.Close();
arduinoPort.Dispose();
@@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.1.1.0")]
[assembly: AssemblyFileVersion("1.1.1.0")]
[assembly: AssemblyVersion("1.1.2.0")]
[assembly: AssemblyFileVersion("1.1.2.0")]

0 comments on commit e1c0c41

Please sign in to comment.