0

I have a very basic analog input C program that reports weather data read from the AN0 pin. If I run the program through the (SSH) command line it will print to that console. Linked is a sample of the output.

I've written the script/service so that the program starts on boot, but can't figure out how to get the LCD to open a console to display the data. Can anyone point me towards a tutorial for this?

Here's the script saved in /usr/bin/ :

!#/bin/bash
/root/analogin

The service saved in /lib/systemd/system/ :

[Unit]
Description=Transponder service

[Service]
WorkingDirectory=/root/
ExecStart=/usr/bin/snow.sh
SyslogIdentifier=snow
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target
SCutler
  • 1
  • 1

1 Answers1

0

Assuming your LCD shows the text system console you can just redirect the stdout of your program to /dev/console. This also assumes you have the permissions to write to /dev/console.

Frank Meerkötter
  • 2,778
  • 2
  • 20
  • 26