Chapter 2. A Raspberry WebIDE Example

In this project, we will learn how to develop projects using the WebIDE from Adafruit Industries. We will flash an SD card with the Raspbian OS, install the Occidentalis tool (https://learn.adafruit.com/adafruit-raspberry-pi-educational-linux-distro/occidentalis-v0-dot-3), set up the web-based development tool, and test the setup using an example.

Note

Occidentalis was initially available as a Raspbian OS image by Adafruit Industries. It comprised of the toolset that enabled to get started with project development using the Raspberry Pi. The OS image was deprecated and released after we finished writing the book. We have taken our best effort to update the book. Please refer to this book's website for more information.

Mission briefing

In this project, we will discuss installing a tool, Occidentalis, and a WebIDE that enables programming in the Python language on the Raspberry Pi. We will also discuss one example from the Adafruit repository and another example of driving an RGB LED.

The following table lists the bill of materials used in this project. These are just examples, and alternative products that have a similar specification may also be used.

Item

Estimated Cost

Raspberry Pi Model B

35 USD

Adafruit Cobbler (https://www.adafruit.com/product/914)

7 USD

Adafruit 7-segment LED Backpack (https://www.adafruit.com/product/879)

10 USD

Blinkm (https://www.sparkfun.com/products/8579)

13 USD

Why is it awesome?

The Adafruit WebIDE in combination with the Occidentalis operating system enables development in the Python language on a Raspberry Pi using just a web browser. It also enables access to sample projects developed by Adafruit via Bitbucket, a source control tool. (If you are not familiar with source control tools such as Bitbucket, Git, and so on, the examples in this project are a great way to get started!) The Adafruit WebIDE is a tool developed for hobbyists and comes with examples for techniques such as pulse-width modulation (used in lighting system control) and I2C communication, and also provides examples for controlling products from Adafruit.

Note

The Adafruit WebIDE is now a beta release and it may not work successfully across different platforms. The Adafruit learning system has indicated that this development tool was directed towards advanced hobbyists. We have taken our best efforts to explain it as simply as possible.

Pulse-width modulation is a technique used widely in motor control, lighting systems, and so on. It is a technique where the average voltage applied to a device is varied by changing the width of the pulse. There are several tutorials on pulse-width modulation (https://learn.sparkfun.com/tutorials/pulse-width-modulation) available all over the Web.

I2C communication (https://learn.sparkfun.com/tutorials/i2c) is a form of serial communication interface used to connect multiple slave devices (usually sensors) with a master device (Raspberry Pi or a microcontroller) through a common interface.

Your Hotshot objectives

In this project, we will discuss the following features:

  • Bootstrapping your Raspberry Pi by installing Occidentalis
  • Setup of remote login into the Raspberry Pi
  • Installation of the Raspberry Pi WebIDE
  • Python development on the WebIDE
  • Test and debugging examples using the WebIDE

    Note

    This project should not be considered as an attempt to promote Adafruit Industries or their products developed for their platform. This project merely demonstrates simplification of development on the Raspberry Pi using a tool from Adafruit Industries.

Mission checklist

In order to get started, the first step is to install the Occidentalis distro, which is a derivative of the Raspbian operating system.

The things required to get started are as follows:

  • A 4 GB SD card flashed with the Raspbian OS
  • An Occidentalis image.
  • An Ethernet cable
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.13.255