1

I'm using +3.3V / GND / TX pins to power this 7-segment display with Serial Port connection. It works, but during booting time, the display displays random things, probably because it receives random values on GPIO TX...

I would like to set the 7-segment display ON only when my Python code starts, and OFF by default (during booting time).

Is there a +3.3V or +5V GPIO pin that is default to OFF (during boot), and that I can power ON with my code?

or

Is there a way to prevent GPIO TX to send random values during booting time?

2

By default the UART TX gpio is used during boot to log boot messages. After boot the UART (RX/TX gpios) is used to allow login.

The simplest way on Raspbian to disable boot messages and login is by using the raspi-config option.

sudo raspi-config
  • Untested but you might also affect this by removing console=ttyAMA0 from /boot/cmdline.txt. – goldilocks Apr 4 '15 at 22:04
  • I'm on Arch Linux @joan so I couldn't test raspi-config. What does it do? Does it do more or less do the same thing than remove console=ttyAMA0 in /boot/cmdline.txt? I tried this and it works (except that on plugging the Pi power, there might be some 1 or 2 random characters fired to TX... How to stop that?) – Basj Apr 4 '15 at 22:24
  • raspi-config edits /boot/cmdline.txt to remove the console field as above and edits /etc/inittab to comment out the final line which spawns a login process on the serial link. There is nothing you can do in software about the spurious power-up characters. Also when the port is opened a spurious start bit is generated. Again you can't do anything about that in software. – joan Apr 4 '15 at 22:33
  • @joan What's the equivalent of removing the final line of /etc/inittab with systemd / archlinux ? – Basj Apr 4 '15 at 22:48
  • 1
    I have no idea. Arch should have something similar. The line is T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100 – joan Apr 4 '15 at 22:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.