Skip to content

Instantly share code, notes, and snippets.

View ringodin's full-sized avatar

Ringotron5000 ringodin

View GitHub Profile
int pwm_a = 3; //PWM control for motor outputs 1 and 2 is on digital pin 3
int pwm_b = 11; //PWM control for motor outputs 3 and 4 is on digital pin 11
int dir_a = 12; //direction control for motor outputs 1 and 2 is on digital pin 12
int dir_b = 13; //direction control for motor outputs 3 and 4 is on digital pin 13
int val = 0; //value for fade
void setup()
{
pinMode(pwm_a, OUTPUT); //Set control pins to be outputs
/*
Arduino Mario Bros Tunes
With Piezo Buzzer and PWM
by: Dipto Pratyaksa
last updated: 31/3/13
//note that pitches.h must be included as a tab on your file
*/
#include "pitches.h"
#include <Servo.h>
Servo lefty; // create servo object to control a servo
Servo righty; // a maximum of eight servo objects can be created
int leftEye = 13;
int rightEye = 11;
void setup()
{
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
int pwm_a = 3; //PWM control for motor outputs 1 and 2 is on digital pin 3
int pwm_b = 11; //PWM control for motor outputs 3 and 4 is on digital pin 11
int dir_a = 12; //direction control for motor outputs 1 and 2 is on digital pin 12
int dir_b = 13; //direction control for motor outputs 3 and 4 is on digital pin 13
int val = 0; //value for fade
const int buttonPin = 7;
void setup()
/* code for max 7219 from maxim,
reduced and optimised for using more than one 7219 in a row,
______________________________________
Code History:
--------------
The original code was written for the Wiring board by:
* Nicholas Zambetti and Dave Mellis /Interaction Design Institute Ivrea /Dec 2004
* http://www.potemkin.org/uploads/Wiring/MAX7219.txt
/* code for max 7219 from maxim,
reduced and optimised for using more than one 7219 in a row,
______________________________________
Code History:
--------------
The original code was written for the Wiring board by:
* Nicholas Zambetti and Dave Mellis /Interaction Design Institute Ivrea /Dec 2004
* http://www.potemkin.org/uploads/Wiring/MAX7219.txt
/* code for max 7219 from maxim,
reduced and optimised for using more than one 7219 in a row,
______________________________________
Code History:
--------------
The original code was written for the Wiring board by:
* Nicholas Zambetti and Dave Mellis /Interaction Design Institute Ivrea /Dec 2004
* http://www.potemkin.org/uploads/Wiring/MAX7219.txt
/* code for max 7219 from maxim,
reduced and optimised for using more than one 7219 in a row,
______________________________________
Code History:
--------------
The original code was written for the Wiring board by:
* Nicholas Zambetti and Dave Mellis /Interaction Design Institute Ivrea /Dec 2004
* http://www.potemkin.org/uploads/Wiring/MAX7219.txt
/* code for max 7219 from maxim,
reduced and optimised for using more than one 7219 in a row,
______________________________________
Code History:
--------------
The original code was written for the Wiring board by:
* Nicholas Zambetti and Dave Mellis /Interaction Design Institute Ivrea /Dec 2004
* http://www.potemkin.org/uploads/Wiring/MAX7219.txt