Topic outline

  • General

    Logo  Madmaker Challenge using Esplora

  • Topic 1

    About Madmaker

    MadMaker is a 6-week online course aimed at Year 9 students with a goal to educate them about embedded systems and their use in everyday life. It involves using Arduino Esplora boards to investigate fun and interactive ways to use science, technology, engineering and maths to solve real-world problems. 

    Students will be given an opportunity to undertake challenges and work with students all over the country.

    The course is run out of the University of Sydney's Electrical Engineering building.

    Our contact is Owen Brazier.

    The course will run in Term 4, 2015. The content will still be available online afterwards if this time bracket does not fit with your class schedule.
    • Topic 2

      The first lesson

      Elsewhere on this site are various introduction to the Arduino.

      Before progressing, you should understand the following.

      • What is meant by an electrical circuit.
      • The names of various components such as resistors, transistors etc
      • How Arduino is a community
      • What is meant by the Scientific Method
      Look here to see an introduction to Arduino
      • Topic 3

        What is a system?

        A system can be thought of as a set of components working together to produce a change.

        An embedded system is some combination of computer hardware and software that is specifically designed for a particular function, usually held on a single board.

        An input is the environment that makes this change happen.

        An output is a measure of the change.

        An input can be made by using a sensor (eg thermistor, button).

        An output is affected by using an actuator (eg light, motor).

        The Arduino Esplora has a number of sensors and actuators built into its board and further components can be embedded via the output ports.


        System, embedded, input, output, sensor, actuator.

        • Topic 5

          Challenge 0 : Getting started 

          Load the relevant software.

          Where to begin

          Arduino IDE from


          Perhaps the best place to start is the old Blink sketch. It makes sure the correct board is selected, the right port is selected and all is ready.

          Open the LED Blink example sketch from the Arduino IDE:

          File > Examples > Esplora > Beginners > EsploraBlink

          A book list

          This simple example, loaded directly from the IDE should run when the computer is connected to the board.

          It may have problems

          • If you have not connected it properly
          • The USB driver has not loaded
          • You have not selected the correct board from tools
          • Not connected the correct USB port to the board
          • Dropped a "}" from the bottom of your code
          • Topic 6

            Getting the board set up

            The Arduino Esplora is a device that has a tiny microcontroller, and a number of inputs and outputs.  At first glance it looks like a videogame controller.

            It runs in a similar fashion to the Uno, but not quite.

            About the board

            Before Esplora runs, you must load the library.


            // include the Esplora library
            #include <Esplora.h>

            Esplora has its own subset of Arduino commands, based on the Esplora library.


            Esplora.writeRGB(255, 255, 255);  // sets red, green and blue all to full brightness

            will not run on the standard Arduino Uno

            Getting started

            Look here for example code from

            • Topic 7

              Challenge 1 background

              There are a number of parts to this first challenge

              • Getting your embedded system in tune with it's computer input via the IDE.
              • Meeting your first conditional statement if ... else
              • Boolean logic
              • Colour theory

              A computer language is composed of several main concepts.

              • Data and data types
              • Sequence
              • Descions
              • Iteration
              • Data structures 
              Data types declare how a variable or constant will be placed into memory.
              Sequence is a series of commands, one ater another.
              Decisions are  branching or halting a program based on a boolean condition that evalutes true or false.
              Iteration is the looping or repeating of a program based on a fixed number or boolean condition. 
              Data structures are the way multiple variables are stored in memory. eg a record, list or file.
              Any introductory course of computer programming will usually follow this outline.

              George Boole invented a system of logic named after him based on whether a statement is completely true or completely false.

              He also wrote the book "Alice in Wonderland" which is said to contain many mathematical references.

              A good place to start (for Australians) is the First Fleet data base.

              eg For how many is gender = "female".

              Try it yourself

              A computer has three colours it displays on its screen. Red, Blue, Green and Black (not a colour).

              It can deliver an intensity measured for each between 0-255. 

              So full red would be Esplora.Red(255)

              Red, blue and Green together to give all the colours  (256 x 256 x 256 = 16,777,216 different shades).

              Use a colour picker on a graphics program to see what shades of RGB give a particular shade.

              This is how paint is mixed, with precise amounts of RGB mixed with white. 

              Binary numbers

              Computers run on o's and 1's in a system called binary numbers. 

              Decimal to binary
              • Topic 8

                Challenge 1: blink

                Use the code  

                Esplora.writeRGB(255, 0, 0);  // make the LED red

                in an esplorer sketch to turn on the red light.

                Document and save your code with an appropriate file name.


                Modify your code to move between Red, Green and Blue

                Modify your code to show Red, Green, Bue, Yellow, Cyn, Magenta, White.

                esplora blink
                • Topic 9

                  Challenge 2: using the touch buttons

                  The esplora has 4 buttons. We will try to use each button to turn on a different colour.

                  Again, save your code in appropriate folders with appropriate file names.

                  The challenge explained

                  Use button 1 to turn the red LED on and off

                  Modify your code so each button changes to a different colour.

                  Modify your code so each button plays a different sound and colour.

                  #include <Esplora.h>
                  void setup() {
                  // Nothing to setup
                  void loop() {
                  if (Esplora.readButton(SWITCH_1) == LOW)   { // Check if switch 1 is pressed.
                      Esplora.writeRed(255); // Turn red led on
                    else {
                      Esplora.writeRed(0); // Turn red led off

                  Adding basic colours


                  #include <Esplora.h>,

                  • Topic 10

                    Challenge 3 : Accelerometers

                    Cartoons like the Simpsons and South Park exist in 2-D. That means their world only has left and right, up and down.

                    3-D adds a third dimension, in and out, while Dr Who has a fourth dimension, time.

                    challenge 2 explained

                    Arduino Esplora can measure tilt in three dimensions using an accelerometer. Each of the three dimensions is given the names X_AXIS, Y_AXIS, or Z_AXIS. Each axis will give you a value between 0 and 1023 as the board is twisted in all directions.

                    You can see this by using the serial port, and writing code that displays the values on the serial monitor.

                    in the IDE look in the ribbon line for Tools > Serial monitor. It will give three values of tilt.


                    Descates and the Cartesian fly

                    #include <Esplora.h>
                    void setup()
                    void loop()
                     int x_axis = Esplora.readAccelerometer(X_AXIS);
                     int y_axis = Esplora.readAccelerometer(Y_AXIS);
                     int z_axis = Esplora.readAccelerometer(Z_AXIS);
                     Serial.print("x: ");
                     Serial.print("\ty: ");
                     Serial.print("\tz: ");
                    See if you can get all three to read 0!
                    • Topic 11

                      The Arduino esplora

                      The esplora has a library of functions specially written for the board. 

                      A function is a sub procedure that returns one result.

                      eg y = sin(30);

                      y is 0.5

                      A library is a set of computer instructions that are written that are added to coad why a sketch is being uploaded to the board.

                      esplora explained

                      esplora library


                      • readSlider()
                      • readLightSensor()
                      • readTemperature()
                      • readMicrophone()
                      • readJoystickSwitch()
                      • readJoystickButton()
                      • readAccelerometer()
                      • readButton()
                      • readJoystickX()
                      • readJoystickY()
                      • writeRGB()
                      • writeRed()
                      • writeGreen()
                      • writeBlue()
                      • readRed()
                      • readGreen()
                      • readBlue()
                      • tone()
                      • noTone()

                      Esplora Blink

                      This sketch blinks the Esplora's Red LED

                      Created on 22 Dec 2012
                      by Tom Igoe

                      This example is in the public domain.

                      #include <Esplora.h>

                      void setup() {
                      // There's nothing to set up for this sketch

                      void loop() {
                      Esplora.writeRGB(255, 0, 0); // make the LED red

                      Each one of these functions can be used to read a value that can be read in serial window and/or can be used in data logging and/or to trigger an actuator.
                      • Topic 12

                        Write to a an LCD screen

                        1.8 Inch 128x160 TFT LCD Shield Display Module SPI Serial Interface For Esplora Game 

                        * Rui Santos
                        * Complete Project Details

                        // include TFT and SPI libraries
                        #include <TFT.h>
                        #include <SPI.h>

                        // pin definition for Arduino UNO
                        #define cs 7
                        #define dc 0
                        #define rst 1

                        // create an instance of the library
                        TFT TFTscreen = TFT(cs, dc, rst);

                        void setup() {

                        //initialize the library

                        // clear the screen with a black background
                        TFTscreen.background(0, 0, 0);
                        //set the text size

                        void loop() {

                        //generate a random color
                        int redRandom = random(0, 255);
                        int greenRandom = random (0, 255);
                        int blueRandom = random (0, 255);

                        // set a random font color
                        TFTscreen.stroke(redRandom, greenRandom, blueRandom);

                        // print Hello, World! in the middle of the screen
                        TFTscreen.text("Hello, World!", 6, 57);

                        // wait 200 miliseconds until change to next color

                        Esplorer pin outs

                        • Topic 13


                          Tinkerkits are a series of components made to click into place for use with esplora.

                           Female Male 3Pin Header Housing Terminal Connector Kit for Jumper Wire

                          2.54mm KF2510-3P Pin Header+Terminal+Housing Connector Kits AG


                          are the current best guesses for the Tinker kit connectors

                          • Topic 14

                            S4A : Scratch for Arduino

                            • Topic 15


                              • Topic 16

                                Programming esplora with Scratch 

                                This program can be used to make an Arduino Esplora act like a PicoBoard. Website
                                • Topic 17


                                  • Topic 18


                                    • Topic 19


                                      • Topic 20


                                        • Topic 21


                                          • Topic 22

                                            The second lesson

                                            • Topic 23

                                              • Topic 24

                                                • Topic 25

                                                  • Topic 26

                                                    • Topic 27

                                                      The second lesson

                                                      • Topic 28

                                                        • Topic 29

                                                          • Topic 30