2017年1月5日 星期四

Week 17 Sean's note 60408027E

Arduino(義大利文):


較大(mega)、信用卡大小(normal)、隨身碟大小(nano)、指甲大小(Maxnano)
CUP內含快取記憶體差不多等同於 SOC 一顆完整的 IC

Bread

麵包有很多洞,軟軟的可以做很多事情

像是 ...



但是這塊麵包,需要特別注意...


如果想要加熱它,記得不要拿銀色的地方,要不然...


實作 Arduino:

非常人性化的下載選項


void setup(){
  pinMode(3, INPUT_PULLUP);
  Serial.begin(9600);
}

void loop(){
 if(digitalRead(3)==LOW){
  Serial.write("Pin3 touch\n"); 
 }
}


Procseeing:

PImage imgBG;
void setup() {
  size(760, 430);
  imgBG=loadImage("taiku.png");
}
int cx=700, cy=160, score=0, heart=1000;
void draw() {
  background(imgBG);
  fill(0,0,128);
  textSize(70);text("Score:" + score + "Heart:" + heart, 100,100 );
  fill(255); rect(195, 102, 760-195, 229-102); 
  fill(251, 69, 43); ellipse(cx, cy, 60, 60); 
  cx -= 3;
  if (cx > 258 && cx < 263 && mousePressed){
      score+= 100;    
  }
  if (cx < 258) {
    heart --;
    cx=800;
  }
}


But 還沒和 Arduino 結合






沒有留言:

張貼留言