Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <tchar.h>
- #include "Arduino.h"
- class Arduino {
- public:
- Serial* Port;
- std::vector <std::string> Output;
- Arduino(const char *input) {
- this->Port = CreatePort();
- this->Output = ArduinoFunction(Port, input);
- }
- Arduino() {
- this->Port = CreatePort();
- }
- void passVariable(const char *input) {
- this->Output = ArduinoFunction(Port, input);
- }
- };
- // application reads from the specified serial port and reports the collected data
- int _tmain(int argc, _TCHAR* argv[])
- {
- //Create Your Device
- Arduino uno;
- //Pass it a variable
- uno.passVariable("6");
- //Get Ouput as a vector of strings
- vout(uno.Output);
- //repeat
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment