Skip to content

Commit

Permalink
Tried to send the arduino messages as integers.
Browse files Browse the repository at this point in the history
  • Loading branch information
IAmCoder committed May 31, 2014
1 parent 2378da4 commit e1c0c41
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Installer/Lucid Scribe ThinkGear EEG.vdproj
Expand Up @@ -2253,14 +2253,14 @@
{ {
"Name" = "8:Microsoft Visual Studio" "Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:Lucid Scribe ThinkGear EEG" "ProductName" = "8:Lucid Scribe ThinkGear EEG"
"ProductCode" = "8:{AD588752-24B4-4FF8-92DB-3A96431C2BD7}" "ProductCode" = "8:{0F9BCCCD-06A7-4BFB-8D56-1F2C4B1DE328}"
"PackageCode" = "8:{49CBC5A2-6456-439A-A754-549FA5AA117E}" "PackageCode" = "8:{F3B34264-F4DC-45D6-9416-309C50482920}"
"UpgradeCode" = "8:{9B1E2A82-9D73-4675-9717-2311206ABC4E}" "UpgradeCode" = "8:{9B1E2A82-9D73-4675-9717-2311206ABC4E}"
"RestartWWWService" = "11:FALSE" "RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE" "RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE" "DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:TRUE" "InstallAllUsers" = "11:TRUE"
"ProductVersion" = "8:1.1.1" "ProductVersion" = "8:1.1.2"
"Manufacturer" = "8:lucidcode" "Manufacturer" = "8:lucidcode"
"ARPHELPTELEPHONE" = "8:" "ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:http://www.lucidcode.com/Contact" "ARPHELPLINK" = "8:http://www.lucidcode.com/Contact"
Expand Down
18 changes: 15 additions & 3 deletions ThinkGear EEG/PluginHandler.cs
Expand Up @@ -664,12 +664,24 @@ private void TriggerArduino()
arduinoPort.BaudRate = 9600; arduinoPort.BaudRate = 9600;
arduinoPort.Open(); 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; int arduinoDelay = Convert.ToInt32(Device.ArduinoDelay) * 60000;
Thread.Sleep(arduinoDelay); 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.Close();
arduinoPort.Dispose(); arduinoPort.Dispose();
Expand Down
4 changes: 2 additions & 2 deletions ThinkGear EEG/Properties/AssemblyInfo.cs
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.1.1.0")] [assembly: AssemblyVersion("1.1.2.0")]
[assembly: AssemblyFileVersion("1.1.1.0")] [assembly: AssemblyFileVersion("1.1.2.0")]

0 comments on commit e1c0c41

Please sign in to comment.