Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //VB C++
- #include<stdio.h>
- #include<stdlib.h>
- #include "Serial.h"
- int main()
- {
- CSerial serial;
- if (serial.Open(4, 9600))
- OutputDebugStringA("Port opened successfully");
- char* lpBuffer = new char[500];
- while (lpBuffer == NULL){
- int nBytesRead = serial.ReadData(lpBuffer, 500);
- }
- OutputDebugStringA(lpBuffer);
- delete[]lpBuffer;
- serial.Close();
- }
- //Arduino
- #include "Arduino.h"
- void setup()
- {
- Serial.begin(9600);
- }
- void loop()
- {
- while(Serial.available()>0) Serial.read();{
- Serial.println("Welcome to the inside of your robot");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement