How to run Pi Cap script at start-up
![How to run Pi Cap script at start-up](http://www.bareconductive.com/cdn/shop/articles/IMG_6909_pc_1920x1080_19ed033a-33eb-4ed3-a568-3ff7c22d4aea_{width}x.jpg?v=1620289848)
Learn how to the run Pi Cap script at start-up
When you develop a script for the Pi Cap you might want to run it as soon as you connect your Pi to power. This way you can light a status LED at launch, or set-up the Pi Cap directly as a piano.
Edit autostart
For this example, we are using the picap-colour-spin.cpp sketch, but you can use any of our examples sketches. Once you have SSH'd into the Pi, enter
sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
At the bottom of the file, add
@bash ./PiCapExamples/Python/picap-touch-mp3-py/run
If you now press CTRL + X, then Y, then enter, it will save the recent edits in the file.
If you now reboot the Pi, the LED should change colour!