2024년 5월 25일 토요일

스크레치-아두이노(S4A)기반 드론제어 / 아두이노 홈페이지

 

88. 드론 https://youtu.be/4H5zXPBIDKg?si=mhP_RYGZZthkCsnh

91. 드론기초 https://youtu.be/_QR-z_vm3qg?si=vQ_NAhISXAZnOBbr

92. 드론pixhttps://youtu.be/eG1MgflG3AM?si=qo0bjFPrGn85jFtQ

14 PART 01 스크레래지를 활용한 제어

7 스크래치 2.0 실행 및 메뉴 설명

@무대 메뉴 : 무대를 만드는 곳으로 저장소에서 불러오기, 그리기, 업로드하기

등의 메뉴가 있다.

프로렉트 명

스크래치 3.0은 인터 환경하에서 사용할 수 있도록 되어 있다. 스크래치

20 오프라인 에디터는 인터넷이 원활하지 않은 교육 환경하에서도 사용할

수 있다.

chmitedu

교재에서는 드론 등의 원활한 제어를 위해 스크래치 2.0 오프라인 에디터

사용한다. 스크 래치 3.0은 스크래치 2.0의 업그레이드 판이므로 스크래치

이해한다면 스크래치 3.0을 사용하는 데 문제가 없을 것이라 판단된다.

지 홈페이지 접속

니티

디터를

여 다운로드를 클릭한다.

이이니이 소개

유용한 자료들

이이디어

자주 물는 길은AOI

법률

기인정보보로경책

디차 니않 저작법

스크레치 패일리

Soatcnd

korot

Seratch Day


https://scratch.mit.edu/download

스크레치기반 드론제어   https://m.blog.naver.com/jinijiniblog/221233766801



스크래치 앱 다운로드

인터넷에 연결되지 않아도 Scratch 프로젝트를 만들고 저장하고 싶으시나요? Scratch 앱을 지금 무료로 다운로드하세요.

https://scratch.mit.edu/downloadScratch - Scratch Offline Editor (mit.edu)



https://scratch.mit.edu/about/

S4A-search for aduino

 https://blog.naver.com/hellosoft/223052806158

      https://blog.naver.com/kidsmaker/222013015928


https://m.post.naver.com/viewer/postView.nhn?volumeNo=25300792&memberNo=6255089

https://blog.naver.com/indsolution/223052728402


스크래치 2.0은 오프라인 에디터는 및 메뉴설명 인터넷 원활하지 않는 교육환경에서 사용할 수 있다. : 확장자 없음


스크래치 3.0은 설치 및 메뉴설명 https://scratch.mit.edu/ 

인터넷환경에서 가능하고 확장자는 Sb-1등으로 생성


드론제어 - 블루투스 동글 드라이버 설치하기 p.121 89, 108,88


아두이노 조이스틱 - https://blog.naver.com/boilmint7/220927175653

 - https://m.blog.naver.com/microfun/221736254902


#1.  스케치 (LED-2V)연습 코드 p. 121~

//1. 목표 : LED를 ON, OFF한다  2. 필요부품 LED 3EA,  220오옴 저항 3ea 

3. 하드웨어 구성  4. 스케치하기 

int led1 =11;
int led2 =12;
int led3 =13;
int time =250;
void setup() {
  // put your setup code here, to run once:
pinMode(led1,OUTPUT);
pinMode(led2,OUTPUT);
pinMode(led3,OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
digitalWrite(led1,HIGH);
delay(time);
digitalWrite(led1,LOW);
delay(time);
digitalWrite(led2,HIGH);
delay(time);
digitalWrite(led2,LOW);
delay(time);
digitalWrite(led3,HIGH);
delay(time);
digitalWrite(led3,LOW);
delay(time);
}


#2. 조이스틱 기본제어 p.134~

// 목표: 1.조이스틱사용하기 2. 필요부품-조스틱 3. 하드웨어 구성 4. 스케치하기

int xin = A0;
int yin = A1;
int key = A2;
void setup() {
  // put your setup code here, to run once:
pinMode(key,INPUT);
Serial.begin(38400);
}

void loop() {
  // put your main code here, to run repeatedly:
int xval = analogRead(xin);
int yval = analogRead(yin);
int buttonval = digitalRead(key);
Serial.print("x = ");
Serial.println(xval,DEC);
Serial.print("y = ");
Serial.println(yval,DEC);
Serial.print("Button is");
if(buttonval == HIGH){
  Serial.println("not pressed");
  } else {
    Serial.println("pressed");
    }
}

# 3. 등등으로 코딩 연습하기 // https://namu.wiki/w/Arduino


# 4. 아두이노 홈페이지에서 함수명 학습하기

- Arduino programming language can be divided in three main parts: functions, values (variables and constants), and structure.

Language Reference 에서 명령어 및 함수 등 용어해설참고 : https://www.arduino.cc/reference/en/?_gl=1*wnfoaa*_ga*OTc2MTc0NTkuMTcxNjA4MTYxNg..*_ga_NEXN8H46L5*MTcxNjcwMTgyMC4yLjEuMTcxNjcwMjA0NS4wLjAuNjMyOTg2NTc0*_fplc*VVYwZW9qJTJGbEFRMEp0UEhDTVZ1SFBTano0eCUyRjU3SzFEUyUyRk5qRlU2RE8yVTRhc2dvU3NEU0ZBQzA3QTV1aFZUc3R1OVc2WlVxUDFlJTJCUUJjeVklMkZnZk40UVI0a0RLT2o0dmVOQmRYN3NRUXNSSlloSDdXYko5azIyb0pPOTM4ZyUzRCUzRA..

(ex:) pinMode()-
Reference > Language > Functions > Digital io > Pinmode

pinMode()

[Digital I/O]

Description

Configures the specified pin to behave either as an input or an output. See the Digital Pins page for details on the functionality of the pins.

It is possible to enable the internal pullup resistors with the mode INPUT_PULLUP. Additionally, the INPUT mode explicitly disables the internal pullups.

Syntax

pinMode(pin, mode)

Parameters

pin: the Arduino pin number to set the mode of.
modeINPUTOUTPUT, or INPUT_PULLUP. See the Digital Pins page for a more complete description of the functionality.

Returns

Nothing

Example Code

The code makes the digital pin 13 OUTPUT and Toggles it HIGH and LOW

void setup() {
  pinMode(13, OUTPUT);    // sets the digital pin 13 as output
}

void loop() {
  digitalWrite(13, HIGH); // sets the digital pin 13 on
  delay(1000);            // waits for a second
  digitalWrite(13, LOW);  // sets the digital pin 13 off
  delay(1000);            // waits for a second
}

Notes and Warnings

The analog input pins can be used as digital pins, referred to as A0, A1, etc.










댓글 없음:

예정공정표_엑셀프로그램 V41 / 공정관리 무료 프로그램 / 데이터 분석-pinterest 실시간모니터링 샘플

 프리킥 /  https://kr.freepik.com/vectors/%EA%B3%B5%EC%A0%95-%EA%B4%80%EB%A6%AC 1.  통합내역프로그램 다운로드(XCOST professional)   http://xcost.me/bbs/boa...