ic Handbag Project

the really interesting stuff ...

Example code for a Gemma

project guide showcase starter kit technical
     

You cannot connect an Adafruit Gemma directly to a computer screen or keyboard. it is powerful, but not that powerful. Instead you write the code on a PC or a Mac and then upload it to the Gemma. Once the Gemma has the code you can disconnect the PC. Go to our tech home page here if you have not yet set up your computer.

Here is a diagram of what is involved.

Best code to test your Gemma Installation

The ideal first test of your installation is with the following standard blink code, which will make the Red LED on the Gemma blink according to the timings you set. Changing the timings is easy so that you can easily see when you have been successful.

The following code is an image to preserve format on a webpage. For ease of use, we created a copy on pastebin which has a 'copy text to clipboard' option. DISCLAIMER. We cannot control the content on Pastebin so be careful and check that what you see looks like the code below.

Example code from Workshop 1

The following code is a starting point for students on Workshop 1. It flashes up to four NeoPixels in a red, green, and blue pattern, with delays inbetween. It uses a BRIGHTNESS of 85, which is one third of the maximum possible (255). The code is designed to make it easy for students to experiment with different colours and light patterns.

We explain how to find a new colour and add it, how to change which NeoPixel (numbered 0, 1, 2, 3) is a particular colour etc. Students take it from there.

All constructive comments about improving the code welcome. Contact email on the bottom of the home page.

The following code is an image to preserve format on a webpage. For ease of use, we created a copy on pastebin which has a 'copy text to clipboard' option. DISCLAIMER. We cannot control the content on Pastebin so be careful and check that what you see looks like the code below.

Example NeoPixel workshop code