loading
1Comments

Tell us about yourself!

Complete Your Profile
  • Interfacing your arduino with a C# program

    Hello, I am trying to build an application that listens and then talks to the arduino, Even though I have managed at other times to get it to work I dont seem to know what it is that works and end up breaking the code while trying to stitch a few changes. So close to finishing the project I dare post here for help. (and stackoverflow)Serial port is open and baud rate is setArduino code snippets:Serial.println('coin');if( Serial.readString() == "1234"); <<<--- how can i relax this condition as i did in the example below. (it does work on the Serial monitor but not on the software, is it an encoding situation?)VS code snippets: SerialPort sp = (SerialPort)sender; string indata = sp.ReadExisting(); if (indata.Contains("coin")) <<&l...see more »Hello, I am trying to build an application that listens and then talks to the arduino, Even though I have managed at other times to get it to work I dont seem to know what it is that works and end up breaking the code while trying to stitch a few changes. So close to finishing the project I dare post here for help. (and stackoverflow)Serial port is open and baud rate is setArduino code snippets:Serial.println('coin');if( Serial.readString() == "1234"); <<<--- how can i relax this condition as i did in the example below. (it does work on the Serial monitor but not on the software, is it an encoding situation?)VS code snippets: SerialPort sp = (SerialPort)sender; string indata = sp.ReadExisting(); if (indata.Contains("coin")) <<<--- it is a relaxed contains condition, better in my case, since I dont really know excaclty what it is receiving.SerialPort.Write("1234"); (how do I make sure it receives the characters i send be it ANSI hex or whatever.thanks for your help.

    View Instructable »