Skip to content

Commit

Permalink
Added getting started with MicroBlocks
Browse files Browse the repository at this point in the history
  • Loading branch information
ianarchbell authored and ianarchbell committed Nov 13, 2018
1 parent ed62f1c commit 2780b3c
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,7 @@ Finally, we plug in an IoT-Bus processor and run the Blink example.
Open Boards Manager from Tools > Board menu and install esp32 platform (select ESP32 Dev Module from Tools > Board menu after installation).

3. Run the Blink example

a. Open the Blink example from the Examples menu. It looks like this:

.. code-block: c++
Some code
b. ...

The other way to use the Arduino framework is to use PlatformIO. See Getting Started with PlatformIO for details.
Download the IoT-Bus examples from `here <https://github.com/iot-bus/iot-bus-examples-arduino>`_.
Then open the iot-bus-blink example and run. You'll see the on-board LED blink once a second.
s
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
Getting Started with esp-idf
============================

The hard way to `setup esp-idf is here <https://docs.espressif.com/projects/esp-idf/en/latest/get-started/>`_ . It's much easier using platformIO because it does all the hard work behind the scenes.
However it maybe useful to see the steps involved. See Getting Started with Platformio for the easy way to use esp-idf.
The hard way to `setup esp-idf is here <https://docs.espressif.com/projects/esp-idf/en/latest/get-started/>`_ .
It's much easier using platformIO because it does all the hard work behind the scenes.
However it maybe useful to see the steps involved.
See :ref:`Getting Started with Platformio <getting-started-with-platformio>` for the easy way to use esp-idf.
You can download or clone the IoT-Bus esp-idf examples from `Github <https://github.com/iot-bus/iot-bus-esp-idf-examples-platformio>`_.

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.. _getting-started-with-microblocks:

Getting Started with MicroBlocks
================================

MicroBlocks is a new programming language inspired by Scratch that runs right
inside micro-controller boards such as the micro:bit, the NodeMCU and many Arduino boards.
The MicroBlocks system allows for dynamic, parallel and interactive programming,
just like in Scratch, but with the twist of letting your projects run autonomously inside the board without being tethered to a computer. Thus, MicroBlocks provides the immediacy and liveness of tethered blocks programming, while supporting real-world applications that require precision timing, autonomous operation, or physically embedding the processor into projects. For example, one might write a program to record acceleration data, then embed the microcontroller and a small battery in a model rocket to explore G-forces at launch time.

In other words, MicroBlocks lets you program your boards exactly like you would in Snap4Arduino,
S4A or the Arduino extension for Scratch, and when you are happy with your program
you can just unplug the board from your computer and everything will keep running as
if by magic!

With MicroBlocks, you can build your own "real world" digital instruments,
interactive jewelry, electronic games and measuring devices, all by using blocks.

You can download MicroBlocks from `here <http://microblocks.fun/download.html>`_.


Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,15 @@ Thank you for choosing PlatformIO IDE for VSCode
:width: 100%

3. Install PlatformIO IDE.
You can find details on using PlatformIO with the IoT-Bus Io board `here <https://docs.platformio.org/en/latest/boards/espressif32/iotbusio.html>`_.

4. Install Iot-Bus examples from Github.
4. Git clone or download the Iot-Bus examples from `Github <https://github.com/iot-bus/iot-bus-examples-platformio>`.

5. Plug in IoT-Bus Io. Open the iot-bus-blink example and run. Onboard LED should blink once a second. When you create a new PlatformIO application simply select the oddWires IoT-Bus Io as the board.
This will also ensure you have the correct default debugger when using the IoT-Bus JTAG board.

6. To debug, simply plug in a JTAG board connect up the USB cable to the JTAG board and start debugging. No configuration of OpenOCD or GDB required.

5. Plug in IoT-Bus Io. Open LED example and run. Onboard LED should blink once a second.



Expand Down
27 changes: 17 additions & 10 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
..
To Do:
- kits - mozilla and a more general iot-bus kit or 2
- complete mozilla tutorials
- more images
- mozilla kits
- more general iot-bus kits
- Two images for the mozilla tutorials
- rules engine tutorial
- more images
- front-page : marketing focused content
- misc
Misc
- schematic issues
- compare against Adafruit docs

- later
Later
- esp-idf examples
- more on using JTAG and debugging
- google home example
- alexa example
- AWS IoT example
- bluetooth examples

To Do Outside Document:
- front-page - marketing focused content
- clean up oddWires site and make more marketing oriented & cross-reference docs
- video
- be able to select boards in arduino
- clean up oddWires site and make more marketing oriented & cross-reference docs
- be able to select boards in arduino
..
Welcome to oddWires IoT-Bus
Expand Down Expand Up @@ -48,6 +52,9 @@ Welcome to oddWires IoT-Bus

getting-started/iot-bus-getting-started-with-moddable

getting-started/iot-bus-getting-started-with-microblocks


.. toctree::
:caption: Boards
:maxdepth: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ IoT-Bus Relay Thing
This example code is in the public domain.
*/
//TODO: Hardcode your wifi credentials here (and keep it private)
//TODO: Hard-code your WiFi credentials here (and keep it private)
const char* ssid = "........";
const char* password = "........";

Expand Down
2 changes: 1 addition & 1 deletion docs/source/tutorials/iot-bus-mozilla-touch-switch.rst
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ Your Thing should be found. Save it and click Done. You should now be able to cl
:width: 100%

The LED should respond to you turning it off and on in the Mozilla IoT interface!
There are lots more examples in the Github file you downloaded or cloned.
There are lots more examples in PlatformIO format `here <https://github.com/iot-bus/iot-bus-mozilla-iot-examples-platformio>`_ or in `Arduino format <https://github.com/iot-bus/iot-bus-mozilla-iot-examples-arduino>`_.

The full code is shown below.

Expand Down

0 comments on commit 2780b3c

Please sign in to comment.