Trying to read the SerialUSB with C# getting no data.
Serial.println() work fine but SerialUSB.println() is not in C#. :o
SerialUSB work with c++ and python but for unknown reason c# since not been able to read the native usb.
I really need the speed of native port and don't want to transfer all the project in c++(at lease i am hopping)
Skecth Println a test string in both Serial
void setup() {
// put your setup code here, to run once:
SerialUSB.begin(9600);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
SerialUSB.println("Test");
Serial.println("Test");
delay(1000);
}
c# code is only a for loop to read the serial inputbuffer. Working with the programming port, but not the native one
using System;
using System.IO.Ports;
namespace test
{
class Program
{
static void Main(string[] args)
{
//Switch com port to your. Mine is COM3 for prog and COM4 for native
SerialPort port = new SerialPort("COM3", 9600);
port.Open();
for(int i =0;i <10;i++)
{
Console.WriteLine(port.ReadLine());
}
port.Close();
}
}
}
On Windows 8.1
Did try arduino IDE 1.5.8 and 1.6.0
tank you all.