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

From Catrobat
Jump to: navigation, search
Line 14: Line 14:
 
For the following steps, you either have to enter the following commands in the terminal of your Raspberry Pi using a keyboard and a display, or you can [https://www.raspberrypi.org/documentation/remote-access/ssh/ connect to your Raspberry Pi via SSH] from your computer or phone.
 
For the following steps, you either have to enter the following commands in the terminal of your Raspberry Pi using a keyboard and a display, or you can [https://www.raspberrypi.org/documentation/remote-access/ssh/ connect to your Raspberry Pi via SSH] from your computer or phone.
 
# Download the installer
 
# Download the installer
: <code>wget http://catrob.at/installraspberino -O install-raspberino.sh</code>
+
#* <code>wget http://catrob.at/installraspberino -O install-raspberino.sh</code>
 
# Unzip the archive using the "unzip" command in the Raspberry Pi.
 
# Unzip the archive using the "unzip" command in the Raspberry Pi.
 
# Give execute permissions to the "installer" file with "chmod +x installer"
 
# Give execute permissions to the "installer" file with "chmod +x installer"

Revision as of 16:53, 19 August 2016

Link to this page: catrob.at/RaspberryPi

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

What you will learn:

  • set up your Raspberry Pi
  • control LEDs/outputs from Pocket Code
  • use buttons/inputs from a Raspberry Pi in Pocket Code


If you encounter any bugs, please let us know and file a report. Thank you!

Install RaspberinoServer on your Raspberry Pi

For the following steps, you either have to enter the following commands in the terminal of your Raspberry Pi using a keyboard and a display, or you can connect to your Raspberry Pi via SSH from your computer or phone.

  1. Download the installer
  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".
    1. 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.
    2. Now try to run "sudo ./installer" again. If this does not work either, please feel free to contact us!
  5. Press Enter to select "Jetzt installieren!"
  6. Optional: Enter a port number (Default is 10000)
  7. Optional: Enter a username that the server will run on (Default is pi)
  8. The installer downloads the Server code, sets up an init.d script and creates necessary config files automatically.
  9. Start the server with "sudo /etc/init.d/RaspberInoServer start"
  10. 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,
  11. 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)