On my raspberry pi there is currently running a program that is automatically looping videos using the omxplayer https://github.com/popcornmix/omxplayer/ as soon as the pi finished booting.
Now i encounter one problem:
In case of a power outage the raspberry will start the video from its beginning.
I want the raspberry to start the video exactly where it stopped, after it got power again after a power outage.
Now my question:
Can i create a snapshot of the raspberry pi every minute, to safe its complete current state?
In case of a power outage i want the raspberry to boot from the latest snapshot, so it will continue the video where it stopped.
Is this going to work? If yes, which programs can i use for that?
Related
I have a bit of a niche question, we have a game designer who has made a small game to run on a raspberry pi, this has been coded in 'gdevelop'.
Is there any way to get this code to send a 5v signal from the raspberry pi, we need a certain point of the game to send a 5v signal to trip a relay.
I don't currently have the code for the game but will hopefully receive it soon.
If this isn't possibly, would we be able to set the raspberry pi up to recognise the controller inputs, track them and send the signal upon the correct sequence of movements inputted simultaneously to running this game code.
The developer has said he plans to save the game as a windows exe on the pi with auto run enabled so one the pi is reset the game automatically starts up and sits waiting the input to begin.
Many thanks in advance and let me know if you need further information!
Here's what I want to do: have a raspberry pi as a simple dedicated player of streamed video, like a kiosk. I have a dedicated small ethernet. On one node The rpi is connected to an HDMI display. The stream sender is a PC running ubuntu linux. I want to stream a video file from there across the ethernet and display it on the rpi. I've managed to set up a prototype connection with udpserver and udpsink, but the CPU maxes out and I can't find a way to use rpi's hardware decode and display. It "should" be possible in theory because I can use omxplayer with a local file on the rpi. There are examples of similar things everywhere, but I can't get them to work. The most common use case is rpi doing the sending and not the receiving.
Does anyone have an example of a PC generating streamable video from a file and sending it over network, and an rpi picking that stream and displaying using omx acceleration? I could do a lot given an example!
RPI is first iteration of hardware, a model b, so doesn't have the raw CPU capacity of the 3/4 models with multiple cores and higher clock rates.
I'm trying to get to work a raspberry pi 0 W and a pervasive display eink screen together.
But, every time when the screen refresh, it reboots the pi 0. Software works great on a RPi3 but not on Rpi0w with Raspbian Lite.
Here is the soft : EpaperDisplay
Here is the screen : Screen
There is no log in /var/log/messages, neither in /var/log/syslog. Every time it reboots, it's erasing history, logs ...
If this was a software issue, you would probably see something in the logs (or you'd at least see a kernel panic message on the console in the HDMI output if you have a screen connected there).
If you have nothing in the HDMI screen when the pi crashes, I'd suspect that the display is using more power than your power supply can provide. Try with a PSU with a higher ampere rating.
If a better power supply does not help, it can be that the display sucks too much 3.3v from the raspberry pi than the zero can provide. In that case you should try feeding the display via a separate 3.3v regulator.
I have a raspberry pi 3.
Whenever I want to shutdown, I always execute this command:
sudo shutdown -h now
And I will wait until only the red light is lighting. (And I always remove the power until only the red light is lighting)
But the problem is : every time I shutdown, I can't boot it again. I need to install the OS into the SD card again every time after I shutdown.
If anyone has the same problem ? Please help me. Thanks a lot.
I encountered this after my comment. As I mentioned, I perform the same steps to safely shutdown, unplug, and store.
Based on this page, you might be getting a corrupt SD card. Not sure if any of these apply.
https://www.raspberrypi.org/documentation/installation/sd-cards.md
If you are having trouble with corruption of your SD cards, make sure you follow these steps:
Make sure you are using a genuine SD card. There are many cheap SD cards available which are actually smaller than advertised or which will not last very long.
Make sure you are using a good quality power supply. You can check your power supply by measuring the voltage between TP1 and TP2 on the Raspberry Pi; if this drops below 4.75V when doing complex tasks then it is most likely unsuitable.
Make sure you are using a good quality USB cable for the power supply. When using a high quality power supply, the TP1->TP2 voltage can drop below 4.75V. This is generally due to the resistance of the wires in the USB power cable; to save money, USB cables have as little copper in them as possible, and as much as 1V (or 1W) can be lost over the length of the cable.
Make sure you are shutting your Raspberry Pi down properly before powering it off. Type sudo halt and wait for the Pi to signal it is ready to be powered off by flashing the activity LED.
Finally, corruption has been observed if you are overclocking the Pi. This problem has been fixed previously, although the workaround used may mean that it can still happen. If after checking the steps above you are still having problems with corruption, please let us know.
Hope that helps.
Cheers.
Ian
I am using a Raspberry Pi 3 B model with a Grove Pi+ (1.2.2 firmware), and Raspbian for Robots Image.
I have plugged in the CO2 MH-Z16 sensor in RPISER port, and I am trying
to execute the code that is available in Dexter's Github
I am getting the following issues:
First time I tried the code, it was working but it was getting very strange results, always out of range and strange temperatures.
It calls the sensor every 18 second.
Now, when I plugged-in the sensor in de RPISER port (with the rpi on), the raspberry pi get frozen. If I tried to restart it, it is not restarting until the sensor is plugged out the rpi. I do not know what is going on, and how to solve this issue. Sometimes, the rpi does not get frozen but the mouse and the keyboard suddenly stop working. If I try to restart the rpi whith the sensor, the rpi is not restarting, it get stucks.
Can I use this sensor in another port?
Any help or any hint?
Oh yes update your firmware. I also took a long time..
https://www.dexterindustries.com/GrovePi/get-started-with-the-grovepi/updating-firmware/