Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
#include
#include
#include
//simple serial port library #include
//stream string to int using namespace std; int main(int argc, char ** argv){ string s = ""; int x=0,y=0; int handle = serialOpen("/dev/ttyACM0", 9600); while (1){ char data =serialGetchar(handle); s.push_back(data); //concatinate chars into string if (strtok(&data, ",")){ //istringstream(s) >> x; cout << s ; //cout << x; s=""; } if (strtok(&data, "\0")){ //istringstream(s) >> y; //cout << s; //cout << y; } } return 0; } /* * sudo apt-get install libwiringpi-dev * * compiled with g++ -Wall -o readSerial readSerial.cpp -lwiringPi * IDONT even here some reading I Guess * https://www.geeksforgeeks.org/converting-strings-numbers-cc/ * https://www.techiedelight.com/convert-string-to-int-cpp/ */
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)