FIANL
PROJECT
星球剧院
star theatre
前情提要 Antecedents feed
1.很久以前有位皮影戏老人,他的皮影戏技术可是称得上是京城第一人。。。
A long time ago, there was an old man who was the first one in Beijing with his shadow puppetry skills.
2.全京城的小孩最喜欢的娱乐活动就是观看皮影戏了,小明也不例外。这天他和往常一样吃完饭去看皮影戏,可接下来的故事却让他终生难忘。。。
Shadow puppetry is the favorite pastime of all the children in Beijing, and Xiao Ming is no exception. One day he went to see the shadow puppet show after dinner as usual, but the next story was unforgettable for him...
3.在路上他经过了一个皮影摊子,奇怪的是没有一个人观看。于是他凑近好奇地问了下:有人吗?我想看皮影戏可以吗?
On the way he passed a shadow puppet stand. Surprisingly, no one was watching. So he leaned closer and asked curiously, Is anyone here? May I see a shadow puppet show?
4.这时一个诡异的声音幽幽的回答道:当然可以。于是就开始表演皮影戏了。。。
Then a strange voice faintly replies: Of course. Then began to perform shadow puppet play...
5.小明越看越觉得不对劲,这哪是皮影戏这分明是恐怖故事,于是他在惊吓中逃走了。。
The more Xiao Ming saw, the more he felt wrong, which is not a shadow puppet play, which is clearly a horror story, so he fled in fright.
6.“哈哈哈哈”我的目的完成了,快乐星球的智者得意的笑了笑。“接下来,我要到21世纪继续恐吓这些无知的小孩子”。。。。
"Ha ha ha ha" my purpose is completed, the wise man of happy planet smirked. "Next, I will continue to terrorize these ignorant children into the 21st century"...
Arduino code
灯带
// NeoPixel Ring simple sketch (c) 2013 Shae Erisson
// Released under the GPLv3 license to match the rest of the
// Adafruit NeoPixel library
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h> // Required for 16 MHz Adafruit Trinket
#endif
// Which pin on the Arduino is connected to the NeoPixels?
#define PIN 6 // On Trinket or Gemma, suggest changing this to 1
// How many NeoPixels are attached to the Arduino?
#define NUMPIXELS 60 // Popular NeoPixel ring size
// When setting up the NeoPixel library, we tell it how many pixels,
// and which pin to use to send signals. Note that for older NeoPixel
// strips you might need to change the third parameter -- see the
// strandtest example for more information on possible values.
Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
void setup() {
// These lines are specifically to support the Adafruit Trinket 5V 16 MHz.
// Any other board, you can remove this part (but no harm leaving it):
#if defined(__AVR_ATtiny85__) && (F_CPU == 16000000)
clock_prescale_set(clock_div_1);
#endif
// END of Trinket-specific code.
pixels.begin(); // INITIALIZE NeoPixel strip object (REQUIRED)
}
void loop() {
pixels.clear(); // Set all pixel colors to 'off'
// The first NeoPixel in a strand is #0, second is 1, all the way up
// to the count of pixels minus one.
for(int i=0;i<NUMPIXELS;i++){
pixels.setPixelColor(i, pixels.Color(255,255,255));
}
pixels.show();
}
舵机
#define SensorINPUT 3 //Connect the sensor to digital Pin 3 which is Interrupts 1.
#include <Servo.h>
unsigned char state = 0;
Servo myservo1;
int pos1 = 0;
Servo myservo2;
int pos2 = 0;
void setup()
{
pinMode(SensorINPUT, INPUT);
myservo1.attach(10); // num1servo控制线连接数字13
myservo2.attach(11); // num2servo控制线连接数字13
attachInterrupt(1, tomplayguitar, FALLING);
}
void loop()
{
if(state!=0)
{
state = 0;
myservo1.write(45);
myservo2.write(75);
delay(50);
}
else
{
myservo1.write(0);
myservo2.write(0);
delay(50);
}
}
void tomplayguitar()//Interrupts function
{
state++;
}
behind the scenes.
1/photos
汤姆和杰瑞设计稿
舞台设计稿