Difference between revisions of "RaspberryPi GPIO Tutorial: LEDs and buttons"

From Catrobat
Jump to: navigation, search
Line 12: Line 12:
 
# Give execute permissions to the "installer" file with "chmod +x installer"
 
# Give execute permissions to the "installer" file with "chmod +x installer"
 
# Run the installer as root "sudo ./installer".
 
# Run the installer as root "sudo ./installer".
## Optional: If this step fails, give execute permissions to the "compile.sh" file, install the necessary dependancies (sudo apt-get install libncurses5-dev libcurl4-nss-dev) and run the compile file./compile.sh.
+
** Optional: If this step fails, give execute permissions to the "compile.sh" file, install the necessary dependancies (sudo apt-get install libncurses5-dev libcurl4-nss-dev) and run the compile file./compile.sh.
## Now try to run "sudo ./installer" again. If this does not work either, please feel free to contact us!
+
** Now try to run "sudo ./installer" again. If this does not work either, please feel free to contact us!
 
# Press Enter to select "Jetzt installieren!"
 
# Press Enter to select "Jetzt installieren!"
 
# Optional: Enter a port number (Default is 10000)
 
# Optional: Enter a port number (Default is 10000)

Revision as of 15:41, 23 July 2016

First steps with RaspberryPi in Pocket Code: create blinking LEDs, use buttons as input

What you will learn:

  • getting started with a RaspberryPi
  • control LEDs and other outputs from Pocket Code
  • use buttons and other inputs

Preparation 1: Install the server application on your RaspberryPi

The suggested way

  1. Download the Raspberry installer from https://pitikay.space/Raspberry.zip
  2. Unzip the archive using the "unzip" command in the Raspberry Pi.
  3. Give execute permissions to the "installer" file with "chmod +x installer"
  4. Run the installer as root "sudo ./installer".
    • Optional: If this step fails, give execute permissions to the "compile.sh" file, install the necessary dependancies (sudo apt-get install libncurses5-dev libcurl4-nss-dev) and run the compile file./compile.sh.
    • Now try to run "sudo ./installer" again. If this does not work either, please feel free to contact us!
  1. Press Enter to select "Jetzt installieren!"
  2. Optional: Enter a port number (Default is 10000)
  3. Optional: Enter a username that the server will run on (Default is pi)
  4. The installer downloads the Server code, sets up an init.d script and creates necessary config files automatically.
  5. Start the server with "sudo /etc/init.d/RaspberInoServer start"
  6. Check the status of the server with "sudo /etc/init.d/RaspberInoServer status". If it's running, everything worked fine. The Server will now start everytime you start the Raspberry Pi,
  7. Optional: Run the installer again and select "Update" from time to time. We will always improve our Server application andw ant you to benefit from it!

Preparation 2: Enable and Configure RaspberryPi in Pocket Code

text


The RaspberryPi Bricks and Sensor in a Nutshell

test

Device-2016-02-02-120459.png

Tutorial 1: Blinking LED (Hello World)