Learn how to use HardwareSerial to communicate across TX/RX pins and view it on the computer using a USB TTL Serial Cable
serialEvent()
that returns void and has no parameters in your main.cpp. This method will be called when data is available on the serial1 port at the end of the loop.#include "stdafx.h"
#include "arduino.h"
int _tmain(int argc, _TCHAR* argv[])
{
return RunArduinoSketch();
}
void setup()
{
Serial.begin(CBR_300, Serial.SERIAL_7O2);
}
int count = 0;
void loop()
{
if (Serial.write('a' + count) != 1)
{
Log(L"Serial.write failed\n");
}else{
Log(L"%c being sent\n", 'a' + count++);
}
if (count == 26) { count = 0; }
Sleep(1000);
}