quynhanh05 / Lop-11A09-Nhom-02

0 stars 0 forks source link

Thảo luận về ý nghĩa code bài tập 2,3,4 về Serial Monitor trên Activities #16

Open quynhanh05 opened 2 years ago

quynhanh05 commented 2 years ago

Phân công: @quynhanh05 @hamy28 @nganchau09

quynhanh05 commented 2 years ago

Tối nay mình bàn nhaa

quynhanh05 commented 2 years ago

259788852_575064980262843_2863689505817813184_n

quynhanh05 commented 2 years ago

258334466_243232467880150_8632611321420892311_n

quynhanh05 commented 2 years ago

258342588_432648808260466_3805614273573268573_n

quynhanh05 commented 2 years ago

tui gửi code để dán bên tinkercad nà Bài 2 void setup() { Serial.begin(9600); } float a; void loop() { a = a + 1.33; Serial.println(a); //In số thực a ra màn hình serial delay(1000); }

Bài 3 void setup() { Serial.begin(9600); } float t, sin1;

void loop() { t = t + 1; sin1 = 100sin(2PItPI/180);
Serial.println(sin1); // Hiện số đồ thị sin delay(50); } // hiển thị màn hình serial đồ thị vào // Tools/Serial Plotter Ctrl+Shift+L

Bài 4: void setup() { Serial.begin(9600); } float t, sin1;

void loop() { t = t + 1; sin1 = 100sin(2PItPI/180);
Serial.println(sin1); // Hiện số đồ thị sin delay(50); } // hiển thị màn hình serial đồ thị vào // Tools/Serial Plotter Ctrl+Shift+L

nganchau09 commented 2 years ago

mình bắt đầu với bài 2 nhaaa~~

hamy28 commented 2 years ago

Serial.begin(9600);: nhận chèn dẽ liệu 9600 bit/giây

quynhanh05 commented 2 years ago

float a; : khai báo biến a là kiểu thực đúng hong mnn

nganchau09 commented 2 years ago

ừa đúng rồi á

nganchau09 commented 2 years ago

a = a + 1.33; : t nghĩ rằng này là mỗi lần lập thì a sẽ tăng thêm 1.33 đơn vị á

quynhanh05 commented 2 years ago

delay(1000); : sau 10s sẽ in a một lần?

hamy28 commented 2 years ago

ũa hình như m nhầm á, 1s chứ hog phải 10s đâu

quynhanh05 commented 2 years ago

CHỐT ĐÁP ÁN BÀI 2 Serial.begin(9600);: nhận chèn dẽ liệu 9600 bit/giây float a; : khai báo biến a là kiểu thực a = a + 1.33; : mỗi lần lập thì a sẽ tăng thêm 1.33 đơn vị delay(1000); : sau 1s sẽ in a một lần

hamy28 commented 2 years ago
quynhanh05 commented 2 years ago

Mumu quá là tuyệt dời đúng hong thầy :))

quynhanh05 commented 2 years ago

đang làm bài 4 nha thầy :)

quynhanh05 commented 2 years ago

thầy chịu khó theo dõi hic

nganchau09 commented 2 years ago

t = t + 1; : sau mỗi lần lập t sẽ tăng thêm 1 đơn vị sin1 = 100sin(2PItPI/180); : chuyển t sang độ rồi tính sin của nó và nhân 100 để mở rộng đồ thị

quynhanh05 commented 2 years ago

CHỐT ĐÁP ÁN CÂU 4: Serial.begin(9600);: nhận truyền dữ liệu 9600 bit/s float t, sin1;: khai báo biến t, sin1 là kiểu thực t = t + 1; : sau mỗi lần lập t sẽ tăng thêm 1 đơn vị sin1 = 100sin(2PItPI/180); : chuyển t sang độ rồi tính sin của nó và nhân 100 để mở rộng đồ thị

quynhanh05 commented 2 years ago

Qua câu 3 nhaa

hamy28 commented 2 years ago

okeee

nganchau09 commented 2 years ago

ukieeee

quynhanh05 commented 2 years ago

Serial.begin(9600); : nhận truyền dữ liệu 9600 bit/s float t, sin1; : khai báo biến t và sin1 là kiểu thực giống câu nãy í

hamy28 commented 2 years ago
nganchau09 commented 2 years ago

sin1 = 100sin(2PItPI/180); : chuyển 2p pi t sang độ sau đó tính sin rồi nhân 100 để đồ thị rộng hơn.

quynhanh05 commented 2 years ago

delay(50); : Hiển thị đồ thị 0.05s 1 lần

quynhanh05 commented 2 years ago

Hết rồi nhaa mn

nganchau09 commented 2 years ago

okeeeeee

hamy28 commented 2 years ago

âuuu kêyyyy

quynhanh05 commented 2 years ago

CHỐT ĐÁP ÁN CÂU 3: Serial.begin(9600); : nhận truyền dữ liệu 9600 bit/s float t, sin1; : khai báo biến t và sin1 là kiểu thực t = t + 1;: sau mỗi lần lặp t sẽ tăng thêm 1 đơn vị sin1 = 100sin(2PItPI/180); : chuyển 2p pi t sang độ sau đó tính sin rồi nhân 100 để đồ thị rộng hơn. delay(50); : Hiển thị đồ thị 0.05s 1 lần