Posts: 2
Joined: Fri Mar 31, 2017 2:19 pm

auto load program problem

Fri Mar 31, 2017 2:51 pm

I'm a STEM Teacher and Librarian... My class is working on creating interactive paintings using Pi kits, MakeyMakeys, speakers, and original paintings. We are using Scratch for our programming because it is very kid friendly. The students wire the paintings, connect the wires to the wasdfg ports on the MakeyMakey which is connected to the PI kit that has speakers attached to it, as well. The students upload .wav sounds and import them into Scratch, program them to specific keys, and when the conductive wires on the paintings are touched (ground and sound wires), the .wav files play. This works fine.

The problem I am running into is that we need the Scratch program to load immediately when the Pi kit boots up. Six to eight paintings will be on display in a Maker Fair, and we will not have monitors with them to manually load the files from the desktop, so they need to load immediately on booting. Is there a command series that I would use to auto load the Scratch file on booting?


Posts: 6449
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: auto load program problem

Sat Apr 01, 2017 11:30 am


I have never used scratch but a google search provided this http://simplesi.net/autostart-scratchgpio-projects/ is it any help ?

if not try a google search with "load scratch program on boot" there are lots of results "About 31,100,000 results (0.75 seconds) "
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

Posts: 1395
Joined: Wed Jun 12, 2013 12:41 pm
Location: Stuttgart Germany
Contact: Website

Re: auto load program problem

Sat Apr 01, 2017 2:26 pm

starting raspbian with scratch 1.4 in LXDE with a specific .sb file

edit File

Code: Select all

nano ~/.config/lxsession/LXDE-pi/autostart
for me it has initially

Code: Select all

@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
@xscreensaver -no-splash
Add scratch call

Code: Select all

@scratch presentation /home/pi/x.sb
The 'presentation' switch also does a 'start flag' for the script.
I had some problems to start a script out of "~/Documents/Scratch Projects/...", most possibly as this folder has a blank in name. So I copied the file into root directory /home/pi (and used a file name without blanks).

On reboot, whenLXDE is started, then scratch is started in presentation mode.
Your remark "and we will not have monitors with them to manually load the files from the desktop" I had to set audio to 3.5mm jack in raspi-config tool.

How is the connection between the makeymakes and scratch made? Just googled and found it uses keyboard commands.
Hope this helps,

Would be interested to see some photo of your setup. Do you have a link ?

Return to “Scratch”