블로그 이미지
훅크선장

카테고리

분류 전체보기 (362)
사진이야기 (23)
펭귄컴퓨팅 (121)
컴퓨터보안 (84)
절름발이 프로그래머 (59)
하드웨어개조 (23)
멀알려줄까 (35)
홈베이킹&홈쿠킹 (2)
잡다한것들 (15)
Total
Today
Yesterday

달력

« » 2024.4
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30

공지사항

태그목록

최근에 올라온 글

이전에 리모콘만으로 설정 가능한 LED 벽시계의 리모콘 분실로 인하여, 아두이노를 가지고 IR 리모콘을 만들어보는 별 쓸모없는 작업을 해보았다. 그런데, 가지고 있는 잡동사니 보드 중에 예전 DEFCON 컨퍼런스를 갔을때, Sparkfun 워크숍을 참가해서 받아온 Roshamglo Badge Kit을 발견했다. Roshamglo 배지 키트는 IR 송신부와 수신부, 그리고 5축 스위치를 가졌기에, 간단한 IR 리모콘으로 만들기에 최적인 보드라고 생각한 것이 실수였다!!!

 

일단 Roshamglo 배지 키트는 2017년에 만들어졌고, 일종의 재미로 만든 보드이다보니, 이젠 더이상 아두이노 IDE 상에서 소프트웨어 라이브러리 지원이 안된다. (아두이노 IDE 소프트웨어를  1.6.10~1.8.x 버전대를 사용하더라도, 보드에 대한 기본적인 소프트웨어 지원 패키지가 없기 때문에, 아두이노 IDE에서 도저히 보드를 연결할 수가 없다.)

 

여기서 포기하면, 하드웨어쟁이가 될 수 없다.

그래서, Roshamglo의 기본이 되는 ATtiny84 MCU를 기준으로 아두이노 ISP를 사용하여 프로그래밍을 시도하였다.

 

Roshamglo Badge Kit 에 대한 정보는 아래의 링크들에서...

https://learn.sparkfun.com/tutorials/roshamglo-hookup-guide/all

 

Roshamglo Hookup Guide - SparkFun Learn

Introduction <!--- ###Attributes Before you begin, make sure you have filled out all required fields found under the Attributes tab. The author is responsible for for the following: * **Title** - Pick a title that makes sense for Search Engine Optimization

learn.sparkfun.com

https://learn.sparkfun.com/tutorials/hack-your-roshamglo-badge/all

 

Hack Your Roshamglo Badge - SparkFun Learn

Introduction So you've put together your Roshamglo badge, and now you want more? Well, we can help you with that. In addition to playing infrared (IR) Rock-Paper-Scissors, the Roshamglo board can be reprogrammed with user-created code. This will allow you

learn.sparkfun.com

https://learn.sparkfun.com/tutorials/roshamglo-project-tv-b-gone/introduction

 

Roshamglo Project: TV-B-Gone - SparkFun Learn

Retired KIT-14130 The SparkFun Roshamglo is the new and fun way to play Rock-Paper-Scissors with your friends! The board uses the ATtiny84, and…

learn.sparkfun.com

 

ATtiny84  프로그래밍에 대한 정보는 다음 링크들에서...

https://github.com/SpenceKonde/ATTinyCore

 

GitHub - SpenceKonde/ATTinyCore: Arduino core for ATtiny 1634, 828, x313, x4, x41, x5, x61, x7 and x8

Arduino core for ATtiny 1634, 828, x313, x4, x41, x5, x61, x7 and x8 - GitHub - SpenceKonde/ATTinyCore: Arduino core for ATtiny 1634, 828, x313, x4, x41, x5, x61, x7 and x8

github.com

https://www.instructables.com/Arduino-Uno-to-Program-ATTINY84-Arduino-V-185/

 

Arduino Uno to Program ATTINY84 (Arduino V. 1.8.5)

Arduino Uno to Program ATTINY84 (Arduino V. 1.8.5): Using the Arduino Uno to program ATTINY84-20PU (Digikey item # ATTINY84-20-PU-ND). This Instructable shows how to use the Arduino platform to work with physically smaller processors, such as the ATtiny84

www.instructables.com

https://www.instructables.com/Program-an-ATtiny44458485-with-Arduino/

 

Program an ATtiny44/45/84/85 With Arduino

Program an ATtiny44/45/84/85 With Arduino: This tutorial gives provides the steps to set up, program, and test an ATtiny44/45/84/85 with an Arduino. It is also provides some explanations as to the inner workings of AVR chips in general.

www.instructables.com

https://www.hackster.io/350166/getting-started-with-attiny84-c920ee

 

Getting started with Attiny84

learn how to program Attiny84 with this custom Breakout board with ams1117 for basic level projects like blinking LED and stuff. By Arnov Sharma and JLCPCB.

www.hackster.io

---------------------------------------------------------------------------------------------------------------------

ATtiny84 MCU 프로그래밍 순서

 

0. ATtinyCore 보드 지원 라이브러리 설치 

Preferences... 에서 Additional boards manager URLs : 에  http://drazzy.com/package_drazzy.com_index.json를 추가해주고, Boards Manager에 가서  ATTinyCore by Spence Konde 를 설치해준다.

(이 글을 쓰는 시점에서 Arduino IDE 2.0.4에서 ATTinyCore version 1.5.2 가 설치되어 잘 동작한다.)

1. Arduino Uno를  Arduino ISP로 만든다. (File -> Examples -> 11. ArduinoISP -> ArduinoISP 선택하고, 스케치 업로드)

2. Arduino Uno와 ATtiny84(Roshamglo Badge Kit)와 연결 

    Arduino Uno의 RESET 핀과 GND 핀 사이에 10uF 커패시터를 연결 (커패시터의 짧은 다리가 GND 쪽에)

 

    Arduino Uno 핀 번호                                         Roshamglo 핀 번호 

                3.3V                <----------------->          3.3V

                GND                <----------------->          GND

                  13                  <----------------->           4 (SCK)

                  12                  <----------------->           5 (MISO)

                  11                  <----------------->            6 (MOSI)

                  10                  <----------------->            RESET

 

3. Roshamglo 에 동작시킬, ino 아두이노 프로그램 작성 

Blink 예제는 다음과 같다.

// Blinking Example

int GREEN_LED = 7; // Green LED가 연결된 핀 7번
int RED_LED = 8; // RED LED가 연결된 핀 8번

void setup(){
pinMode(GREEN_LED, OUTPUT); // Green LED를 출력으로 설정합니다.
pinMode(RED_LED, OUTPUT); // RED LED를 출력으로 설정합니다.
}
 
void loop(){
digitalWrite(GREEN_LED, HIGH); // Green LED 켜기
digitalWrite(RED_LED, LOW); // RED LED 끄기
 
delay(1000); // 1초간 유지합니다.
 
digitalWrite(GREEN_LED, LOW); // Green LED 끄기
digitalWrite(RED_LED, HIGH); // RED LED 켜기
delay(1000); // 1초간 유지합니다.
}
 
4.  Tools -> Board 설정에서  ATtinyCore -> ATtiny24/44/84(a) (No Bootloader) 선택 
                     Port는 Arduino Uno 가 연결된 포트를 지정 (/dev/cu.usbmodemXXXXXX 로 표시됨)
                     나머지 칩 설정은 기본을 그대로 둔다. 다만, Clock Source 가 8MHz (Internal) 인것을 반드시 확인한다.
      Programmer 설정에서 “Arduino as ISP”  반드시 지정 
 
5. Tools -> Burn Bootloader 선택 실행 후,
6. Sketch -> Upload using Programmer 로 프로그램을 업로드한다.
 
에러가 없이 다 정상적으로 수행되었다면, Okay~~!!  

  

Posted by 훅크선장
, |