![]() ![]() Next we have to disable the Serial Console, to free the serial port for our own communication.įor that you'll have to edit the file /etc/inittab. You may have to add the dialout group to other, maybe less obvious, accounts too, depending on the intended use of the system.įor instance if you want your web server to controll the serial port you may have to add the dialout group the the www-data user too. ![]() If you are logged in as a different user you'll have to use that username instead on the line above. In the line above pi is the user you want to add a group to. ![]() Taking ownership of the serial port is as easy as adding the group dialout to your login id. It's not practical to have to become root every time we run a program which uses the serial port. When properly set up, the Pi's serial port can be used to talk to this I/O micro processor with minimal effort.įirst of all we have to make sure that we are allowed to access the serial port, without having to become root. I'd rather frie a €2 micro controller than my precious Raspberry Pi. On top of that it protects the Raspberry Pi from electrical mishaps. I don't say that it is impossible to achieve precise timing on the Pi alone, but a dedicated micro controller is much better suited for that task.Īnd it doesn't have to cost more than €1 or €2 at today's prices. Remember that Linux is a multi tasking OS, which means that it may give priority to other tasks, putting your real time application on hold for a few milliseconds. If we can free the serial port from its terminal duties we can put the serial port of the Raspberry Pi to better use.įor instance to interface with real world, in real time, using a micro controller. Today however we use the ethernet connection for that, preferably over ssh so it is even safe to command your Pi over the insecure internet. This means that you can connect a terminal, or terminal emulator, to the serial port and start sending commands to the Raspberry Pi.īack in the old days this was a great way to control a headless Linux machine. Per default the Raspberry Pi's serial port is setup as a console port. Setup The Serial Interface For Communication Introduction ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |