Skip to content

Suggestion for improved compatibility  #16

@WrickColl

Description

@WrickColl

Python and Node.js should be basically interchangeable so that users can investigate the qualities of both languages easily.
Currently one has to modify the /boot/config.txt file and reboot to change over. This is because the two languages solved the serial device naming change differently.
If all references to the serial communication on pins 14 and 15 are changed to "/dev/serial0" instead of /dev/ttyxxx in both languages then everything will be compatible between different versions of Raspberry Pi and between Python and Node.js.
For Python this change needs to be made in the "megaPi.py" file, and remove the advice about swapping the ports in the README.
For node.js it is done by the user so all example programs should be modified.
Also the user just needs to add "enable_uart=1" to their "/boot/config.txt" file.
I have made these changes to my own copy of the files and now I can can swap between languages directly without reboot or any fuss.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions