Link to main project page

Kit List

Starter: 10mins

What are mirco controllers? (in general)

Answers that include the follow information are acceptable plus examples: A microcontroller (sometimes abbreviated µC, uC or MCU) is a small ‘computer’ on a single integrated circuit containing a processor core, memory, and programmable input/output peripherals. Microcontrollers are designed for embedded applications, in contrast to the microprocessors used in personal computers or other general purpose applications.

What is Gemma? (specific)

Gemma board

“Get started with Adafruit GEMMA with this lovely starter kit! Included is everything you need to make a basic project. There’s a GEMMA board, four sewable bright RGB pixels, a battery holder and batteries, 2-ply conductive thread, alligator clips to help you test out your circuit, and a USB cable for programming GEMMA.” Adafruit.com

The Gemma does not have a Serial port connection for debugging so the serial port monitor will not be able to send/receive data. Unlike the Flora, the Gemma must be connected to a computer via a USB cable. Once programmed it will run any code uploaded onto it.

Set up IDE or launch application

  1. Set Up IDE (if not done already) see here for instructions
  2. Check your kits has everything
  3. Check that you have spare Coin cell batteries (optional)

Testing your microcontroller. Connect Gemma via the usb to the computer as use Blinky code to test the onboard LED. This activity can be done as a separate activity or part of the circuit testing and then moving on to add more code.

int led = 1;
// blink the built in red LED
// 26 - 03 - 14

void setup() {
 pinMode(led, OUTPUT);
}

//
void loop() {
 digitalWrite(led, HIGH);
 delay(4000);
 digitalWrite(led, LOW);
 delay(8000);
}

GEMMA:

What Can we MAKE?

What can we make?

How many Neopixels can the Gemma Run?

Yes! Gemma was designed to drive short segments of NeoPixels. There is enough RAM on the attiny85 to drive 100 pixels, but depending on program RAM usage you may have to scale back to 60 or 40.  Then you have to think about Power.

To use with neopixels:

  1. Connect the + power line of the strip to Vout on the Gemma, or to a separate 4-7VDC power source such as a 3 or 4 pack of AA batteries.
  2. Connect the – common ground to the battery pack (if being used) and also to the Gemma GND pin
  3. Connect the data in line to Gemma #1 – this will let you also see when data is being sent because the #1 red LED will flicker. You can use other pins but start with #1 since its easiest to debug and use
  4. Install the NeoPixel library as detailed in our Uber Guide, and change the PIN to 1 (its 6 by default)
  5. Upload and enjoy!

Setting up the IDE (if using for the first time)

MAIN 45mins +++

Task 1 Circuit Design – What are you making?

Draw the Circuit– Individual Task. This is a really good paper based activity.  The have to draw the circuit for the project.  They should use a colours/labels to highlight the different wires. They will need to think about how much distance to use between each LED/ Neopixel. Compare circuits with a fellow student.  Check to see if the circuit would work? Correct any errors.

Test the circuit: Using crocodile clips create a simple 2 neopixel circuit with the Gemma to test the circuit. Don’t forget to remove the battery pack when stitching onto the material.

What Can we MAKE?

How many Neopixels can the Gemma Run?

Yes! Gemma was designed to drive short segments of NeoPixels. There is enough RAM on the attiny85 to drive 100 pixels, but depending on program RAM usage you may have to scale back to 60 or 40.  Then you have to think about Power. The brighter the LEDS the more power.

To use with neopixels:

  1. Connect the + power line of the strip to Vout on the Gemma, or to a separate 4-7VDC power source such as a 3 or 4 pack of AA batteries.
  2. Connect the – common ground to the battery pack (if being used) and also to the Gemma GND pin
  3. Connect the data (drive) in line to Gemma #1 – this will let you also see when data is being sent because the #1 red LED will flicker. You can use other pins but start with #1 since its easiest to debug and use
  4. Install the NeoPixel library as detailed in our Uber Guide, and change the PIN to 1 (its 6 by default)
  5. Upload and enjoy!

THINK: What colour or light pattern do I want?

//COLOURWIPE
// Fill the dots one after the other with a color
void colorWipe(uint32_t c, uint8_t wait) {
  for(uint16_t i=0; i<strip.numPixels(); i++) {
      strip.setPixelColor(i, c);
      strip.show();
      delay(wait);
  }


//TWINKLE PATTERN
//Theatre-style crawling lights.
void theaterChase(uint32_t c, uint8_t wait) {
  for (int j=0; j<10; j++) {  //do 10 cycles of chasing
    for (int q=0; q < 3; q++) {
      for (int i=0; i < strip.numPixels(); i=i+3) {
        strip.setPixelColor(i+q, c);    //turn every third pixel on
  }

CODE YOUR PATTERN

Using the sample code modify to produce the pattern and colour you want.

Save your code and name appropriately.

Task 2 Build

Using your chosen piece of clothing or material layout out the components on to the material.

Stitching can take a VERY long time as the thread is harder to work with than normal thread. Allow plenty of time for threading of needles and tying off thread. The image below is a neopixel on chiffon.  No recommended for a class project as stitching on chiffon is very difficult and the results are not as reliable as they are with other materials.

Stitching with conductive thread

Stitch the drive thread first. This is good practice.  The ground and the power thread can be a single piece of the thread. The ‘Drive’ thread (the one with arrow) has to stop and restart at each Neopixel. Ensure that ALL neopixels are facing in the same direction. The arrow should point away from the Gemma. —–> There should ONLY be thread in between each neopixel

Neopixel stitching

Neopixel stitching

Once you have stitched all the stitching(Drive, Ground and Power) connect the battery pack.

Links to Curriculum:

UK:

USA: Computer Science Mapped Common Core


AUS/ NZ Curriculum

Digital Technologies knowledge and understanding
6.1 Investigate the main components of common digital systems, their basic functions and interactions and how such digital systems may connect together to form networks to transmit data
8.1 Investigate how data are transmitted and secured in wired, wireless and mobile networks, and how the specifications of hardware components impact on network activities
Digital Technologies processes and production skills
6.4 Define problems in terms of data and functional requirements, and identify features similar to previously solved problems
6.9 Manage the creation and communication of ideas and information including online collaborative projects, applying agreed ethical, social and technical protocols
8.10 Create and communicate interactive ideas and information collaboratively (online), taking into account social contexts
8.11 Plan and manage projects, including tasks, time and other resources required, considering safety and sustainability
Design and Technologies knowledge and understanding
6.2 Investigate how forces or electrical energy can control movement, sound or light in a designed product or system
8.3 Analyse how motion, force and energy, are used to manipulate and control electromechanical systems when designing simple, engineered solutions
Design and Technologies processes and production skills
6.8 Apply safe procedures when using a variety of materials, components, tools, equipment and techniques to make designed solutions
8.9 Effectively and safely use a broad range of materials, components, tools, equipment and techniques to make designed solutions
4.9 Plan a sequence of production steps when making designed solutions individually and collaboratively
6.10 Develop project plans that include consideration of resources when making designed solutions individually and collaboratively
8.11 Use project management processes individually and collaboratively to coordinate production of designed solutions