-
-
Notifications
You must be signed in to change notification settings - Fork 262
Camera in Map
This is based on the work from Everlanders (https://gist.github.com/Everlanders) and adapted to my specific needs - so very big thank you to Everlands and of course this project.
It will allow you to have camera in maps. I have not worked on video recording etc... this is not something I require, but please feel free to add in (or add this function to the main app)
- Android Auto in Dev mode with 720p enabled
- 720 set in Cranshaft settings
- Pi camera DISABLED in Crankshaft
- X11 Enabled (EGL makes the map flicker every second)
- SSH Access to the device
- A press button connected to a GPIO (take a note of which one it is)
- Reboot the machine once you are sure all the settings are as above
SSH into the pi and log on. Unlock the system OS
crankshaft system unlock
Run the setup program
sudo raspi-config
enable the camera under the interfaces and save
Test the camera by running this
raspivid -t 0 -vf -h 480 -w 800
IF you have errors (and no picture) - resolve these errors prior to continuing
Adding the script Unlock the boot partition 'crankshaft boot unlock' browse into the correct folder 'cd /boot/crankshaft' create the file using this command 'sudo nano camera.py'
Paste the code from https://gist.github.com/Beebock/fe722044e5098906e406b14aa286dd84 (my fork of the main code) As you an see from the code, it is also able to control the brightness - this I have not documented / used, however you will just need to add a button to the GPIO as declared at the front of the script.
Add the script to the startup.
Edit the startup file.
sudo nano startup.py
Add this line
import camera
save and exit nano, reboot the pi.
If everything worked correctly, you should now be able to hit the button and see a picture. There are 3 settings you can circulate through.
- picture in picture
- Full screen transparent
- Full screen
- off
- Home
- Roadmap
- General Changes / Changelog
- Installing / Updating
- When Issue occur
- Hardware
- Configuration
- Features
- Home
- Get started
- Hardware
- Software and Settings
- For Advanced Users
- Et Cetera