Click here to Skip to main content
15,792,608 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Using fstream with USB Serial Port Pin
Richard MacCutchan7-Jul-18 7:52
mveRichard MacCutchan7-Jul-18 7:52 
GeneralRe: Using fstream with USB Serial Port Pin
OscardelaGrouch7-Jul-18 7:55
OscardelaGrouch7-Jul-18 7:55 
GeneralRe: Using fstream with USB Serial Port Pin
OscardelaGrouch7-Jul-18 9:21
OscardelaGrouch7-Jul-18 9:21 
GeneralRe: Using fstream with USB Serial Port Pin
mo14927-Jul-18 13:59
mo14927-Jul-18 13:59 
GeneralRe: Using fstream with USB Serial Port Pin
OscardelaGrouch7-Jul-18 14:18
OscardelaGrouch7-Jul-18 14:18 
GeneralRe: Using fstream with USB Serial Port Pin
mo14927-Jul-18 15:51
mo14927-Jul-18 15:51 
GeneralRe: Using fstream with USB Serial Port Pin
OscardelaGrouch7-Jul-18 16:46
OscardelaGrouch7-Jul-18 16:46 
GeneralRe: Using fstream with USB Serial Port Pin
mo14927-Jul-18 17:10
mo14927-Jul-18 17:10 
I kind of doubt that getline will wait for data as it has no way of knowing how
much data to expect.

A quick search for Linux and Delay turned up a sleep() command that may be what you need.

Also a search of "Linux synchronous serial port PIC" showed several of examples where they went through the process of setting the parameters for the serial port and running a loop to retrieve data.

Something like (pseudo code):
while (1)
{
read(1 char);
if char == "\n"
break;
}
You would probably read the text and convert back to integer.

You might try that search.
Hope this helps.
GeneralRe: Using fstream with USB Serial Port Pin
OscardelaGrouch8-Jul-18 9:08
OscardelaGrouch8-Jul-18 9:08 
GeneralRe: Using fstream with USB Serial Port Pin
mo14928-Jul-18 12:55
mo14928-Jul-18 12:55 
GeneralRe: Using fstream with USB Serial Port Pin
OscardelaGrouch9-Jul-18 9:49
OscardelaGrouch9-Jul-18 9:49 
AnswerRe: Using fstream with USB Serial Port Pin
OscardelaGrouch8-Jul-18 11:57
OscardelaGrouch8-Jul-18 11:57 
GeneralRe: Using fstream with USB Serial Port Pin
OscardelaGrouch9-Jul-18 9:52
OscardelaGrouch9-Jul-18 9:52 
AnswerRe: Using fstream with USB Serial Port Pin
Jochen Arndt10-Jul-18 4:31
professionalJochen Arndt10-Jul-18 4:31 
GeneralRe: Using fstream with USB Serial Port Pin
OscardelaGrouch10-Jul-18 10:53
OscardelaGrouch10-Jul-18 10:53 
GeneralRe: Using fstream with USB Serial Port Pin
OscardelaGrouch10-Jul-18 19:43
OscardelaGrouch10-Jul-18 19:43 
GeneralRe: Using fstream with USB Serial Port Pin
Jochen Arndt10-Jul-18 22:09
professionalJochen Arndt10-Jul-18 22:09 
GeneralRe: Using fstream with USB Serial Port Pin
OscardelaGrouch11-Jul-18 18:40
OscardelaGrouch11-Jul-18 18:40 
GeneralRe: Using fstream with USB Serial Port Pin
Jochen Arndt11-Jul-18 22:16
professionalJochen Arndt11-Jul-18 22:16 
GeneralRe: Using fstream with USB Serial Port Pin
OscardelaGrouch12-Jul-18 19:42
OscardelaGrouch12-Jul-18 19:42 
GeneralRe: Using fstream with USB Serial Port Pin
Jochen Arndt12-Jul-18 21:59
professionalJochen Arndt12-Jul-18 21:59 
GeneralRe: Using fstream with USB Serial Port Pin
OscardelaGrouch14-Jul-18 8:51
OscardelaGrouch14-Jul-18 8:51 
GeneralRe: Using fstream with USB Serial Port Pin
Jochen Arndt14-Jul-18 9:36
professionalJochen Arndt14-Jul-18 9:36 
GeneralRe: Using fstream with USB Serial Port Pin
OscardelaGrouch14-Jul-18 9:38
OscardelaGrouch14-Jul-18 9:38 
GeneralRe: Using fstream with USB Serial Port Pin
Jochen Arndt14-Jul-18 9:43
professionalJochen Arndt14-Jul-18 9:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.