Let's Make a gadget with the GR-PEACH board!

The Gadget Renesas Project provides the GR-PEACH board for use with a Web compiler, for easy creation of simple gadgets. The board comes with a microcontroller (MCU),-- that flat black square in the middle of the board--that operates as a mini computer. By programming this MCU, you can make things flash in various colors, produce sounds and melodies, and move objects.

Sketch Reference:

This reference describes libraries for writing program for GR-PEACH, and HTTP API for controling web compiler. Refer to the below when you start to use GR-PEACH at the first time. In case using mbed compiler, refer to mbed page.

Arduino Sketches

The GR-PEACH board and Arduino are almost compatible. Most of the pin layout is the same and libraries are used in almost the same manner. The only key difference is, in Arduino, programs are called "sketches". For simplicity, we call a program a "sketch" for GR-PEACH as well.

Let us explain a little about how sketches work. The simple sketch to the below makes one LED on the GR-PEACH board flash.

#include <Arduino.h>
void setup(){
    pinMode(PIN_LED_RED, OUTPUT);
}

void loop(){
    digitalWrite(PIN_LED_RED, HIGH);
    delay(200);
    digitalWrite(PIN_LED_RED, LOW);
    delay(200);
}
    

One unique characteristic about Arduino is that setup() and loop() must be written in the description.
The setup() function is called only once after start up. The sketch to the above is preparing to turn on an LED using the pinMode() library.
The loop() function is then executed repeatedly. The sketch to the above uses the digitalWrite() and delay() libraries to make an LED flash.
Whenever creating a sketch for the PEACH board, always describe #include <Arduino.h> in the first line.

The best thing about ABC Arduino is its extensive number of libraries. These libraries allow you to do just about anything quite easily, from making LEDs flash, to creating sounds, running motors and connecting to a network. Check out the contents of each library by selecting LIBRARY in the above menu.

About Pin layout

Below describes pin layout of the GR-PEACH. There are many cases you use the library with pin number.


For example, the following description means to set pin2 to LOW.

digitalWrite(2, LOW);
    

The folllowing description means to read from A0 condition.

analogRead(A0);
    




Made by the Gadget Renesas Project