New answers tagged

0

.bashrc is NOT intended to run scripts. It is run each time a non-login interactive shell is started and is used to configure the shell. ~/.bashrc: executed by bash(1) for non-login shells. There are may ways of running scripts, depending on what you are trying to do. See https://raspberrypi.stackexchange.com/a/47537/8697 for an example.


3

There are different methods to start a script on bootup. Using ~/.bashrc is definitely a wrong method. It is only made to configure the bash shell when it is launched. So every time the bash shell is executed your python script will also start. Your script is started with /etc/xdg/lxsession/LXDE-pi/autostart and it is also started with the bash shell. So you ...


0

You need to fix all those wonky quote marks in your code. When I recoded your program as #!/bin/bash # Add ricnumber. riclist=( '428824' '408888' ) while IFS='' read -r line do printf -v filename "rtj`date +%Y_%m_%d`.log" echo "`date +%T` $line" >> $filename count=0 while [ "${riclist[count]}" != "&...


1

It is possible to run Firefox in kiosk mode on RPi. You’ll need a small hack to emulate hitting the F11 key though. First install firefox-esr: sudo apt install firefox-esr Then you’ll need to install xdotool, which is a tool to do fake keyboard input, among others. sudo apt install xdotool Then, in your autostart file you add the following: firefox -kiosk -...


1

Build (make; sudo make install) this ioctl tool. Then you should be able to issue IOCTL requests supported by the SPI driver: SPI_IOC_RD_MAX_SPEED_HZ, SPI_IOC_WR_MAX_SPEED_HZ ... pass a pointer to a u32 which will return (RD) or assign (WR) the maximum SPI transfer speed, in Hz. The controller can't necessarily assign that specific clock speed. If you ...


0

Got it. Very simple...in BASH #Defines gpio pin direction gpio -g mode 17 out #green gpio -g mode 27 out #yellow gpio -g mode 22 out #red #Turns off GREEN led gpio -g write 17 0 #Turns on RED led gpio -g write 22 1


0

You can install firefox-esr on RPi now sudo apt-get install firefox-esr -y and you can run it in kiosk mode - at least from the browser (F11) Firefox says /[install directory]/firefox -kiosk -private-window [target URL] should do it but I've not been able to make that work right now https://support.mozilla.org/en-US/kb/firefox-enterprise-kiosk-mode


Top 50 recent answers are included