Warning: Constant WP_MEMORY_LIMIT already defined in /home/domains/museduino.org/docs/wp-config.php on line 93
rianne – Page 2 – Museduino

Button

Overview

This tutorial will teach you how to implement a push button that turns on an LED with two smorgasboards on different ports.

Components

Arduino
A/B USB cable
Museduino Shield
2 Museduino Smorgasboards
2 CAT5 cables
LED
10k resistor
button
screwdriver

Setup

First, follow the setup for the LED Tutorial.

After you’ve completed the setup, locate Digital Pin 4 using the Satellite I/O chart.

The Pin Configuration chart shows that Digital Pin 4 is Satellite I/O pin 4 on Port C. Satellite I/O pin 4 has the following pin configuration:

1 – Power
2 – Signal + Resistor in Series
3 – Direct Signal
4 – Ground

Now hook up a button to Satellite I/O 4. Use Power (screw terminal pin 1), signal (screw terminal pin 3), and a 10k resistor between signal (screw terminal pin 3) and ground (screw terminal pin 4). Use a screwdriver to loosen/tighten the screw terminals.

Now connect the Smorgasboard to Port C on the main shield.

Code

Copy code below or download from Github. Once the sketch has been successfully uploaded, push the button to turn on the led.


/*
  Museduino | Button Tutorial
  Button turns on LED when pushed
*/
 
// Digital Pin 6 on Satellite Pin 5 via Port A
int s5A = 6;
// Digital Pin 4 on Satellite Pin 4 via Port C
int s4C = 4;

// variables
int buttonState = 0; // variable for reading the button status

// the setup routine runs once:
void setup() {                
  // initialize the led pin as an output
  pinMode(s5A, OUTPUT); 
  // initialize the button pin as an input
  pinMode(s4C, INPUT);  
    
}

// the loop routine runs over and over again forever:
void loop() {
  
  // read the state of the button value:
  buttonState = digitalRead(s4C);
  
  // check if the button is pushed
  // if it is, the buttonState is LOW:
  if (buttonState == LOW) {
    // turn LED on:
    digitalWrite(s5A, HIGH);
  }
  else {
      // turn LED off:
      digitalWrite(s5A, LOW);
  }
  
}

Want to use Servo Motors with Museduino?

LED

Overview

This tutorial will teach you how to wire up an LED with the Smorgasboard.

Components

Arduino
A/B USB cable
Museduino Shield
Museduino Smorgasboard
CAT5 cable
LED
screw driver

Setup

The main Museduino Shield’s header pins align with the Arduino headers. The shield should be stacked on top of the Arduino like below:

Next, let’s determine the I/O available on port A of the Museduino shield. Use the pinout chart to find Arduino Digital pin 6.

After reviewing, you will find that Digital pin 6 is Satellite Pin 5 on Port A.

Satellite boards have a solder mask to label Satellite I/O pins. You can find Satellite I/O 5 by locating the circled number 5.

Each Satellite I/O has a 4 pin configuration. Review the pin configuration chart:

This tutorial uses a Smorgasboard Satellite. Satellite I/O 5 has the following pin configuration (from the left of the screw terminal block):

1 – Power

2 – Signal pin with resistor in series

3 – Direct signal pin

4 – Ground

Museduino boards were designed for robust rapid-prototyping. By including a resistor in series in the pin configuration, this minimizes the need for additional parts, breadboards or soldering.

Simply, connect the positive side (anode) of the LED to the screw terminal pin 2 (signal + resistor in series) and the negative side of the led (cathode) to screw terminal pin 4 (ground). You will need a screwdriver to tighten/loosen the screw terminals.

Then, connect the Smorgasboard satellite to Port A on the Museduino Shield via CAT5 cable.

Code

Copy code below or download from Github.

Upload the sketch to your microcontroller. You should have a blinking LED.


/*
  Museduino | LED Tutorial
  Turns on LED for one second, then off for one second, repeatedly.
*/
 
// Digital Pin 6 on Satellite Pin 5 via Port A
int s5A = 6;

// the setup routine runs once:
void setup() {                
  // initialize the digital pin as an output
  pinMode(s5A, OUTPUT);     
}

// the loop routine runs over and over again forever:
void loop() {
  digitalWrite(s5A, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);               // wait for a second
  digitalWrite(s5A, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);               // wait for a second
}

Want to add a button?

Puppet Theater

Our puppet theater sample project (created for Hands of Enchantment Puppeteers in Albuquerque, NM) uses the Bluetooth LE Shield in order to control the color of the neopixel strips with the Adafruit Bluefruit LE Connect iphone/android app. The final version uses Museduino 2.0,  with 2 30-neopixel strips and 2 external power satellite boards.

Pneumatic Tubes

Our pneumatic tube system is built as two stations that can send and receive messages on either end. Originally, each station housed their own arduino, but were autonomous systems, existing together but not communicating directly.

The original version was built for the Santa Fe children’s museum in NM.

Since then, we have redesigned our pneumatic tubes prototype with the Museduino. Now we can use one Arduino for both stations. When a station sends a message, the lightbulb on the receiving end gets a light pulse, and when the other side receives the message, the sending side pulses. It’s a more real system, and despite the fact that its a complete anachronism, the joy of sending pneumatic messages feels current to us!