[PYTHON] Check! Let's develop Raspberry Pi Zero remotely-Try using Arafruit WebIDE

Good evening, I'm Kazumi Ohira, also known as @dz_, an oak fan.

Prologue-Introduction

Fortunately, I got the Raspberry Pi Zero because I met the timing of the inventory recovery!

You can develop your Raspberry Pi remotely for more convenienceAdafruit WebIDEI decided to try. Make a note of the installation and setup instructions.

By the way, if you want Pi Zero, check the stock status of multiple online shops on the site Where is My Pi Zero?. I can. GOOD LUCK! :)

What is Adafruit WebIDE?

By the way, Adafruit WebIDE is an IDE (Integrated Development Environment) for Raspberry Pi that can be accessed and developed from other terminals with a web browser.

Once you have set up the WiFi on the Raspberry Pi, you can develop it remotely, which seems to be very convenient.

As shown in the figure below, you can use not only an editor but also a sample code collection and terminal provided by Adafruit. The source code can be managed with Git and works with Bitbucket. 20160324_pizero_adafruit-webide_011.png

The assumed language is Python. There is also a terminal so you can do anything if you want to.

Rough flow of introduction

Now, to get started with Adafruit WebIDE, you can easily get started by following the steps below.

  1. Install Adafruit WebIDE on Raspberry Pi
  2. Launch the Adafruit WebIDE
  3. Create a Bitbucket account
  4. Issue a Bitbucket consumer key
  5. Set up the Adafruit WebIDE

Installation procedure

Let's actually introduce it.

  1. Install Adafruit WebIDE on Raspberry Pi

First, let's install the Adafruit WebIDE on the Raspberry Pi. Execute the following command.

#Install Adafruit WebIDE
pi@raspberrypi:~ $ curl https://raw.githubusercontent.com/adafruit/Adafruit-WebIDE/alpha/scripts/install.sh | sudo sh
  1. Launch the Adafruit WebIDE

After installation, start the service.

#Launch Adafruit WebIDE as a service
pi@raspberrypi:~ $ sudo service adafruit-webide.sh start

After starting the service, access it from a remote machine in the same network. Open http: // <Raspberry Pi IP Address> or http: // <Raspberry Pi IP Address>: 8090 in your web browser. It is OK if the following screen is displayed. If you don't see it, the port may be different, so check your config as follows: 20160323_pizero_adafruit-webide_002_01.png

Check the config

#Check the Adafruit WebIDE config
pi@raspberrypi:~ $ less /usr/share/adafruit/webide/config/config.js

config.js


exports.editor = {
  "port": 80,
...

In this case, it will start on port 80.

  1. Create a Bitbucket account

Basically, follow the steps shown above to proceed with the setup.

First, create an account for Bitbucket and log in.

  1. Issue a Bitbucket consumer key

Then issue a consumer key for the connection. Click the icon in the upper right to open the "But bucket Setting".

Open OAuth> OAuth Consumer> Add Consumer Key. Specify the required information and permissions and save the consumer key. In addition, please adjust the authority as appropriate. 20160410_adafruit-webide_001.png

  1. Set up the Adafruit WebIDE

Next, set the "Key" and "Secret" of the created consumer key to Adafruit WebIDE. In addition, specify the Full Name and email required for committing and press "Send Query". 20160410_adafruit-webide_002.png

The login screen will be displayed. Log in with your Bitbucket account and you are ready to use the IDE! 20160410_adafruit-webide_003.png

Epilogue-Conclusion

After this, I was able to wire to GPIO of Raspberry Pi normally, write a python program and execute it. You can also debug.

Also, Adafruit WebIDE seems to have a Schedule Manager, so it may be possible to let the WebIDE handle the periodic processing.

Recommended Posts

Check! Let's develop Raspberry Pi Zero remotely-Try using Arafruit WebIDE
Let's do Raspberry Pi?
Indoor monitoring using Raspberry Pi
Let's make a cycle computer with Raspberry Pi Zero (W, WH)
Try using ArUco on Raspberry Pi
Using a webcam with Raspberry Pi
Detect "brightness" using python on Raspberry Pi 3!
Run servomotor on Raspberry Pi 3 using python
Detect temperature using python on Raspberry Pi 3!
Raspberry pi Let's talk Scam repulsion phone