Cross-Platform serial comms - Raspberry Pi Forums


i have python program @ moment runs equally on python (pc) , python (pi), because doesn't use exotic hardware - standard input , output far.

next step, need able output ascii data serial data port. pc still old enough have actual rs232 ports, need present there. pi, i've built logic level 232-level converter soc's uart.

don't know (because haven't looked yet) whether have develop separate pc , pi forks of program, 1 pc specific comms handling , other pi specific serial comms handling. i'm assuming need use pyserial, don't know whether manages make hardware same no matter underlying system runs on: or whether there specific flavours of pyserial for each operating system, each own os-specific syntax.

i'd prefer python program able determine system running on interrogating system somehow, , run appropriate system specific comms code.

feasible?

pyserial cross-platform, should run on windows , on *nix system (linux, mac os x, bsd, etc.). program need detect os it's on find serial ports available. simplest way let user tell program serial port use, you'd want anyway in cases.


raspberrypi



Comments

Popular posts from this blog

CAN'T INSTALL MAMBELFISH 1.5 FROM DIRECTORY - Joomla! Forum - community, help and support

error: expected initializer before 'void'

CPU load monitoring using GPIO and leds - Raspberry Pi Forums