Similar documents
slide


Processingをはじめよう


Processingをはじめよう

Arduino Processing and ) Fig1. Arduino Homepage : h;p://

<4D F736F F D B B83578B6594BB2D834A836F815B82D082C88C60202E646F63>

Arduino UNO IS Report No. Report Medical Information System Laboratory

課題

pp2018-pp4base

課題

課題

tn_soturon_sjis.dvi

スライド 1

課題

Processing入門マニュアル17

Taro-テキスト.jtd

大容量情報検索論

<4D F736F F F696E74202D F4B87555F A838B B F5F91E63389F12E >

情報システム設計論II ユーザインタフェース(1)

課題

配付資料

Microsoft PowerPoint P演習 第10回 関数.ppt [互換モード]

課題

設問 println はそこで指定されている内容を出力して改行するものである. 一方,print は内容を出力して改行しないものである. 下記のプログラムそれぞれについて出力結果がどうなるか回答せよ. 下記のプログラム - を実行すると, fms という文字列が 回表示される. プログラム - vo

2 個の円の移動サンプル 9-2 float y0,y1; // 円の中心の Y 座標 float x0,x1; // 円の中心の X 座標 float v0,v1; // 円の縦方向の移動速度 int radius; size(300,400); radius = 10; v0 = random(

もう少し数学っぽい関数もあります 関数名 abs(x) sqrt(x) sq(x) pow(x,n) exp(x) log(x) dist(x1, y1, x2, y2) constrain(v, m0, m1) lerp(v0,v1,t) map(v, low1, high1, low2, hig

p5.js p5.js p5.js Tetris Tetris

問 1 図 1 の図形を作るプログラムを作成せよ 但し ウィンドウの大きさは と し 座標の関係は図 2 に示すものとする 図 1 作成する図形 原点 (0,0) (280,0) (80,0) (180,0) (260,0) (380,0) (0,160) 図 2 座標関係 問 2

課題

スライド 1

課題

プログラミング演習 Ⅰ 第 14 回 2017/6/5( 月 ) ゲームを作る クイズ 担当 : 紅林林

Microsoft Word - SU1204教本(Driver)原稿.docx

Java演習(4) -- 変数と型 --

情報システム設計論II ユーザインタフェース(1)

ネコでもわかるインタラクティブサウンド by ちゃーりー

Java学習教材

講習会 Arduino

CG

K227 Java 2

情報システム設計論II ユーザインタフェース(1)

19 3!! (+) (>) (++) (+=) for while 3.1!! (20, 20) (1)(Blocks1.java) import javax.swing.japplet; import java.awt.graphics;

挙動チェックポイントなどセミコロン ; を忘れていませんか? 黄色なんだか動かないで表示されている部分またはその少し前 Syntax error, maybe a missing にセミコロンを忘れている場所はありま semicolon? などと表示されます せんか? なんだか動作がおかしい の部分

ESP8266-CORE-R Copyrig

r3.dvi

Microsoft Word - SU1202教本(Disp)原稿.docx

_福島GamejamCRI・ミドルウェア事前セミナー資料

スライド 1

II - ( 02 ) 1,,,, 2, 3. ( ) HP,. 2 MATLAB MATLAB, C Java,,., MATLAB, Workspace, Workspace. Workspace who. whos. MATLAB, MATLAB Workspace. 2.1 Workspac


pp2018-pp10base

JAXA key

Microsoft Word - SU1203教本(Sens)原稿.docx

スライド 1

スライド 1

10K pdf

pp2019-pp10-base

Microsoft Word - mtb2011_processing.docx

ESP32-KEY-KIT-R1 (ESP-WROOM-32 ) Copyright c 2

やさしいJavaプログラミング -Great Ideas for Java Programming サンプルPDF

Python3 Next 2

Java Java Java Java Java 4 p * *** ***** *** * Unix p a,b,c,d 100,200,250,500 a*b = a*b+c = a*b+c*d = (a+b)*(c+d) = 225

2013 年度 卒業論文 Arduino による Boe-Bot 制御 指導教員白井英俊教授 中京大学情報理工学部情報知能学科 学籍番号 H 蟹井翔貴 (2014 年 1 月 )

r6.dvi

入門Java解答.doc

情報システム設計論II ユーザインタフェース(1)

使って ソースコードで書かれた処理を実行しています まず ソースコードをバイトコード (byte code) と呼ばれる仮想的な機械語に変換します そのバイトコードを仮想機械 (virtual machine) と呼ばれるインタープリンタが読み込み 実行をしていきます バイトコード呼ばれる命令はシン

明解Javaによるアルゴリズムとデータ構造

r3.dvi

任意の加算プログラム

Java プログラミング Ⅰ 7 回目 switch 文と論理演算子 今日の講義講義で学ぶ内容 switch 文 論理演算子 条件演算子 条件判断文 3 switch 文 switch 文 式が case のラベルと一致する場所から直後の break; まで処理しますどれにも一致致しない場合 def

pp2018-pp9base

2016_Sum_H4_0405.ai


2CH DC (PU-2709) DC DC Arduino 製作に必要な部品などを表にまとめてみましょう 用意するもの 型番など 必要数 メモ Arduino Arduino UNO R3 1 パルスを作るマイコンボード 28BYJ-48 1 ACアダプター DC5V 1 DCジャック


MODLINK-2 Arduino&IoT 組立式開発ボード Manual モジュリンク 2 取扱説明書

‚æ4›ñ

8 if switch for while do while 2

2 p.2 2 Java Hello0.class JVM Hello0 java > java Hello0.class Hello World! javac Java JVM java JVM : Java > javac 2> Q Foo.java Java : Q B

Java講座


INDEX 1 必要なものを準備しよう 各部の名称を確認しよう 電源を入れよう スイッチで LED を光らせよう BiZduino で Wi-Fi 通信しよう RTC を使ってみよう 参考資料 7 困ったら... 21

SystemC言語概論

r2.dvi

10/ / /30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20 6. http, CGI Perl 11/27 7. ( ) Perl 12/ 4 8. Windows Winsock 12/11 9. JAV

x h = (b a)/n [x i, x i+1 ] = [a+i h, a+ (i + 1) h] A(x i ) A(x i ) = h 2 {f(x i) + f(x i+1 ) = h {f(a + i h) + f(a + (i + 1) h), (2) 2 a b n A(x i )

Mathematica で Arduino を利用する (2012 年度 ) はじめに情報工学部では全学科で Arduino を導入して フィジカルコンピューティングに関連した教育を行ってきている 電子情報工学科ではいくつかの実験演習を通じて Arduino を取り入れてきている ここでは 電子情報

1 Python LOGO Python Python Python Anaconda Python Anaconda Python Python 3.6 version Python2 Python3 Python 2.7 Py

xyr x y r x y r u u


アルゴリズムとデータ構造1

Arduino の勉強会 平成 23 年 1 月 5 日於 : 鳥取大学

Untitled

新・明解Java入門

sotu.dvi

資料5:聖ウルスラ学院英智小・中学校 提出資料(1)

‘¬”R.qx

2

Transcription:

line(x1, y1, x2, y2); (x1, y1) rect(x, y, width, height); (x, y) (x1, y1) (x2, y2) height width (x2, y2) ellipse(x, y, width, height); rectmode(corners); rect(x1, y1, x2, y2); (x,y) width height

strokeweight(4); background(200); background(200,180,100); background(200,180,100,150); stroke(200,180,100); nostroke(); fill(200,180,100);

// Modified example 03-17 int x, y; void setup(){ size(480, 360); nostroke(); background(204, 226, 225); noloop(); x=width/2; y=height/2; void draw(){ fill(255, 0, 0, 160); ellipse(x-108, y+22, 200, 200); fill(0, 255, 0, 160); ellipse(x-12, y-66, 200, 200); fill(0, 0, 255, 160); ellipse(x+28, y+68, 200, 200);

int, float, boolean, char for, while if ~ else, switch() ~ case mousex, mousey, pmousex, pmousey mousepressed, mousepressed() key, keypressed, keypressed() map(), constrain()

int x, y; x=150; y=100; line(x, y, 400, y); for(int i=0; i<10; i++){ line(x, y+30*i, 400, y+30*i); int i=0; while(i<10){ line(x, y+30*i, 400, y+30*i); i++;

// Example 503P // June 18, 2013, H. Kawakami int w=400, h=300; int x=50, y=70; int m=10, n=10; float u, v; u=w/m; v=h/n; size(500,500); rect(x, y, w, h); stroke(200); for(int i=0; i < m+1; i++){ line(x, y+v*i, x+w, y+v*i); line(x+u*i, y, x+u*i, y+h);

w = map(x, xmin, xmax, wmin, wmax) xmin x xmax -2.0 2.0 x-axis wmin wmax 50 w 450 w-axis

w = ax + b a=(wmax-wmin)/(xmax-xmin); b=(wmin*xmax-wmax*xmin)/(xmax-xmin) w-axis wmax 450 w wmin 50 b -2.0 xmin x 2.0 xmax x-axis

y 7.0 y=x^3-x+1-5.0-2.0 2.0 x

y=x^3-x+1:example 504P float plotx1, plotx2, ploty1, ploty2; float u, v, u0, v0; float xmin=-2.0, xmax=2.0; float ymin=-5.0, ymax=7.0; float h, x, y; int N=80; void setup(){ size(500,500); background(255); plotx1=50; plotx2=width-50; ploty1=50; ploty2=height-50; rectmode(corners); stroke(#5679c1); rect(plotx1, ploty1, plotx2, ploty2); strokeweight(1); v0=map(0, ymax, ymin, ploty1, ploty2); line(plotx1, v0, plotx2, v0); u0=map(0, xmin, xmax, plotx1, plotx2); line(u0, ploty1, u0, ploty2); strokeweight(4); h=(xmax-xmin)/n; for(int i=0; i<n; i++){ x=xmin+h*i; y=x*x*x-x+1.0; u=map(x, xmin, xmax, plotx1, plotx2); v=map(y, ymax, ymin, ploty1, ploty2); point(u, v);

RESET IOREF RESET 3V3 5V GND GND Vin A0 A1 A2 A3 A4 A5 POWER ANALOG IN 15 16 17 18 19 20 21 22 23 24 25 26 27 28 ATMEGA328P-PU 14 13 12 11 10 9 8 7 6 5 4 3 2 1 ARDUINO UNO R3 TX RX ON L DIGITAL(PWM~) AREF GND 13 12 ~11 ~10 ~9 8 7 ~6 ~5 4 ~3 2 TX->1 RX<-0 X X 1 5 10 15 20 A A B C D E F G H I J 5 10 15 20 B C D E F G H I J 1 Y Y Ω Ω

// Example 505A // Serial communication with Processing int ledpin=6; int sensorpin = A0; int val = 0; void setup() { Serial.begin(9600); void loop() { val = analogread(sensorpin)/4; analogwrite(ledpin, val); Serial.write(val); delay(100);

// Example 505P // Serial communication with Arduino import processing.serial.*; Serial port; int x; float val; void setup() { size(500, 500); framerate(30); String arduinoport = Serial.list()[5]; port = new Serial(this, arduinoport, 9600); background(255); void draw() { if ( port.available() > 0) { val = port.read(); val = map(val, 0, 255, height, 0); strokeweight(1); stroke(255); line(x, 0, x, height); // Black line stroke(0,255,0); line(x+1, 0, x+1, height);// White line strokeweight(4); stroke(255,0,0); point(x,val-50); x++; if (x > width) { x = 0;

void draw() { if ( port.available() > 0) { val = port.read(); radius = map(val, 0, 255, 0, height * 0.45); int middlex = width/2; int middley = height/2; float x = middlex + cos(angle) * height/2; float y = middley + sin(angle) * height/2; stroke(0); line(middlex, middley, x, y); import processing.serial.*; Serial port; float val; float angle; float radius; x = middlex + cos(angle) * radius; y = middley + sin(angle) * radius; stroke(255); line(middlex, middley, x, y); angle += 0.01; void setup() { size(440, 440); framerate(30); strokeweight(2); String arduinoport = Serial.list()[5]; port = new Serial(this, arduinoport, 9600); background(0);