Communication between micro pyhton and c++

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
Post Reply
Nyxaal
Posts: 2
Joined: Wed May 14, 2014 10:21 am

Communication between micro pyhton and c++

Post by Nyxaal » Thu May 15, 2014 12:42 pm

Hi all,

First, Thanks for this wonderful project, i really enjoy experimenting with my fresh received board.

I try to establish a bidirectional communication between uPyhton and C++ through Serial.
The goal is to send python code from c++ and receive the result, the same way as it is done by Putty.
I think about using the REPL mode likes with Putty, but don't succeed to make it works.
I succeed to connect to the board with a serial library, but commands i send appear to not being executed.

Any idea ? Do i go the wrong way ?
Thanks for your answers !

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Communication between micro pyhton and c++

Post by dhylands » Thu May 15, 2014 3:45 pm

I'll guess that you need to send \r as the end of line rather than \n

Most serial terminals send \r when you hit ENTER.

fma
Posts: 164
Joined: Wed Jan 01, 2014 5:38 pm
Location: France

Re: Communication between micro pyhton and c++

Post by fma » Thu May 15, 2014 4:25 pm

I wanted to ask something related: how do we use other USARTS available? Is there a Serial(num_port) object, as found in Arduino?
Frédéric

fma
Posts: 164
Joined: Wed Jan 01, 2014 5:38 pm
Location: France

Re: Communication between micro pyhton and c++

Post by fma » Fri May 16, 2014 11:13 am

:oops: There is a UART object!!!!

Sorry for the noise!
Frédéric

Nyxaal
Posts: 2
Joined: Wed May 14, 2014 10:21 am

Re: Communication between micro pyhton and c++

Post by Nyxaal » Tue May 20, 2014 12:24 pm

Thanks for you answer,
totally right ;)

Post Reply