Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use SparkFun_Roshamglo: Examples, Pinouts, and Specs

Image of SparkFun_Roshamglo
Cirkit Designer LogoDesign with SparkFun_Roshamglo in Cirkit Designer

Introduction

The SparkFun Roshamglo is an interactive badge that lets you play rock-paper-scissors, the classic hand game, with a modern twist. It is equipped with an ATtiny84 microcontroller, an LED matrix for displaying game symbols, and push buttons for player input. This badge is not only a fun gadget but also serves as a development platform compatible with the Arduino programming environment, making it a versatile tool for learning and prototyping.

Explore Projects Built with SparkFun_Roshamglo

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
ESP32-WROOM-32UE Wi-Fi Controlled Robotic Car with OLED Display and RGB LED
Image of mkrl bot: A project utilizing SparkFun_Roshamglo in a practical application
This circuit is a WiFi-controlled robotic system powered by an ESP32 microcontroller. It features an OLED display for status messages, an RGB LED for visual feedback, and dual hobby gearmotors driven by an L9110 motor driver for movement. The system is powered by a 4 x AAA battery pack regulated to 5V using a 7805 voltage regulator.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Uno Wi-Fi Controlled Rover with Ultrasonic and PIR Sensors
Image of Copy of surveillance rover: A project utilizing SparkFun_Roshamglo in a practical application
This circuit is a Wi-Fi controlled rover with obstacle detection and motion sensing capabilities. It uses an Arduino Uno to interface with an HC-SR04 ultrasonic sensor for distance measurement, a PIR sensor for motion detection, a micro servo for camera panning, and an L298N motor driver for controlling the rover's motors. The ESP8266 Wi-Fi module allows remote control via a web interface.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino and ESP32-CAM Based Autonomous Robot with Ultrasonic Obstacle Detection and Battery Power
Image of Fire Detection MK3: A project utilizing SparkFun_Roshamglo in a practical application
This circuit is a robotic vehicle controlled by an Arduino UNO, featuring an ultrasonic sensor for obstacle detection, multiple DC gear motors for movement, and servomotors for precise control. The system uses an L293D driver shield to interface the motors and sensors, and includes an ESP32-CAM for potential video streaming or image capture capabilities.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO and L298P Drive Shield Controlled Robotic Car with Bluetooth and LED Indicators
Image of Copy of cmp sci isu (1): A project utilizing SparkFun_Roshamglo in a practical application
This circuit is a remote-controlled robot car with an Arduino UNO and an L298P motor driver shield, powered by a 12V battery. The Arduino controls the motors for movement and LEDs for visual feedback, while a piezo buzzer provides audio alerts. Bluetooth connectivity is provided for remote commands.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with SparkFun_Roshamglo

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of mkrl bot: A project utilizing SparkFun_Roshamglo in a practical application
ESP32-WROOM-32UE Wi-Fi Controlled Robotic Car with OLED Display and RGB LED
This circuit is a WiFi-controlled robotic system powered by an ESP32 microcontroller. It features an OLED display for status messages, an RGB LED for visual feedback, and dual hobby gearmotors driven by an L9110 motor driver for movement. The system is powered by a 4 x AAA battery pack regulated to 5V using a 7805 voltage regulator.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Copy of surveillance rover: A project utilizing SparkFun_Roshamglo in a practical application
Arduino Uno Wi-Fi Controlled Rover with Ultrasonic and PIR Sensors
This circuit is a Wi-Fi controlled rover with obstacle detection and motion sensing capabilities. It uses an Arduino Uno to interface with an HC-SR04 ultrasonic sensor for distance measurement, a PIR sensor for motion detection, a micro servo for camera panning, and an L298N motor driver for controlling the rover's motors. The ESP8266 Wi-Fi module allows remote control via a web interface.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Fire Detection MK3: A project utilizing SparkFun_Roshamglo in a practical application
Arduino and ESP32-CAM Based Autonomous Robot with Ultrasonic Obstacle Detection and Battery Power
This circuit is a robotic vehicle controlled by an Arduino UNO, featuring an ultrasonic sensor for obstacle detection, multiple DC gear motors for movement, and servomotors for precise control. The system uses an L293D driver shield to interface the motors and sensors, and includes an ESP32-CAM for potential video streaming or image capture capabilities.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Copy of cmp sci isu (1): A project utilizing SparkFun_Roshamglo in a practical application
Arduino UNO and L298P Drive Shield Controlled Robotic Car with Bluetooth and LED Indicators
This circuit is a remote-controlled robot car with an Arduino UNO and an L298P motor driver shield, powered by a 12V battery. The Arduino controls the motors for movement and LEDs for visual feedback, while a piezo buzzer provides audio alerts. Bluetooth connectivity is provided for remote commands.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Educational Tool: Introduce students to basic programming and electronics.
  • Gaming: Use it as a portable game to play rock-paper-scissors.
  • Wearable Technology: Wear it as a badge at events or conferences.
  • Development Platform: Experiment with custom code and electronics.

Technical Specifications

Key Technical Details

  • Microcontroller: ATtiny84
  • Operating Voltage: 3V (CR2032 coin cell battery)
  • Programming Interface: UPDI (Unified Program and Debug Interface)
  • Display: LED matrix
  • Input: Two tactile push buttons
  • I/O Pins: 12 (multiplexed with LED matrix and buttons)

Pin Configuration and Descriptions

Pin Number Function Description
1 VCC Power supply (3V)
2 GND Ground
3-10 PB0-PB7 Digital I/O, multiplexed with LED matrix
11 Reset/UPDI Reset pin or UPDI for programming
12 PA0 Analog input or digital I/O
13 PA1 Analog input or digital I/O, button input
14 PA2 Analog input or digital I/O, button input

Usage Instructions

How to Use the Component in a Circuit

  1. Powering the Device: Insert a CR2032 coin cell battery into the battery holder.
  2. Programming: Connect a UPDI programmer to the Reset/UPDI pin to upload your code.
  3. Playing the Game: Use the push buttons to select rock, paper, or scissors.

Important Considerations and Best Practices

  • Battery Life: To conserve battery life, implement a sleep mode in your code.
  • Button Debouncing: Implement software debouncing to ensure accurate button presses.
  • LED Brightness: Adjust the brightness of the LED matrix to balance visibility and power consumption.

Troubleshooting and FAQs

Common Issues

  • Device Not Powering On: Ensure the battery is inserted correctly and has charge.
  • Unresponsive Buttons: Check for proper debouncing in the code or hardware issues.
  • LED Matrix Not Lighting Up: Verify connections and ensure the LED matrix is properly addressed in the code.

Solutions and Tips for Troubleshooting

  • Battery Issues: Replace the battery if the device is not powering on.
  • Programming Errors: Double-check the code for errors and ensure the correct board settings in the Arduino IDE.
  • Hardware Inspection: Examine the badge for any physical damage or loose connections.

FAQs

Q: How do I program the Roshamglo? A: Use a UPDI programmer and the Arduino IDE with the appropriate board package installed.

Q: Can I modify the game code? A: Yes, the Roshamglo is open for code customization. You can write your own game logic or other applications.

Q: Is the Roshamglo reprogrammable? A: Absolutely, you can reprogram it as many times as you like using the UPDI interface.

Example Code for Arduino UNO

Below is an example code snippet for initializing the LED matrix on the SparkFun Roshamglo. This code is intended for illustrative purposes and assumes you have set up the appropriate board definitions for the ATtiny84 in the Arduino IDE.

#include <avr/power.h>
#include <avr/sleep.h>

// Define the LED matrix and button pins
const int ledPins[] = {3, 4, 5, 6, 7, 8, 9, 10};
const int buttonPins[] = {13, 14};

void setup() {
  // Initialize the LED pins as outputs
  for (int i = 0; i < 8; i++) {
    pinMode(ledPins[i], OUTPUT);
  }

  // Initialize the button pins as inputs with pull-up resistors
  for (int i = 0; i < 2; i++) {
    pinMode(buttonPins[i], INPUT_PULLUP);
  }
}

void loop() {
  // Example code to light up the LED matrix in some pattern
  for (int i = 0; i < 8; i++) {
    digitalWrite(ledPins[i], HIGH); // Turn on each LED
    delay(100);                     // Wait for 100 milliseconds
    digitalWrite(ledPins[i], LOW);  // Turn off each LED
  }
}

Remember to keep the code comments concise and within the 80 character line length limit. This example demonstrates basic initialization and control of the LED matrix and buttons on the Roshamglo badge.