HOME > »óÇ°Èıâ
»óÇ°ºÐ·ù
°Ë»ö¾î
¹øÈ£ À̹ÌÁö »óÇ°¸í/Èıâ ÀÛ¼ºÀÚ ÀÛ¼ºÀÏ ÆòÁ¡
119
[Á¤Ç°] ¾ÆµÎÀ̳ë ÇÁ·Î¹Ì´Ï 328 - 5V/16MHz (Arduino Pro Mini 328 - 5V/16MHz) / ÇÁ·Î ¹Ì´Ï
Áö³­¹ø ŸÀ̴ϵÎÀ̳뺸´Ù ´õ ³ªÀºµí...
³ª¶ò¹è·¯ 2013-04-01 ¡Ú¡Ú¡Ú¡Ú¡Ú
¹°·Ð »ç¿ëÇÏ´Â ¿ëµµ¿¡ ´Ù¸£°ÚÁö¸¸, Àú´Â °³ÀÎÀûÀ¸·Î ÇÁ·Î¹Ì´Ï°¡ ´õ ±¦ÂúÀº °Í °°½À´Ï´Ù. USB·Î ÇÁ·Î±×·¡¹ÖÇÏ´Â°Ô ¾Æ´ÏÁö¸¸, Àú´Â º°µµÀÇ USB-FTDIÄÁ¹öÅÍ°¡ À־ ±×´ÙÁö ¹®Á¦°¡ µÇÁö ¾Ê³×¿ä. ŸÀ̴ϵÎÀ̳ë´Â USB·Î ÇÁ·Î±×·¡¹ÖÀÌ °¡´ÉÇÏÁö¸¸, µÎ°³ÀÇ º¸µå¸¦ »ç¾ßÇÏ´Â ¾à°£ÀÇ °æÁ¦Àû ¾Ð¹ÚÀ¸·Î..¤Ì¤Ì
Áß±¹¿¡¼­ ¸¸µç°Ç ÁÙ ¾Ë¾Ò´Âµ¥, ¾ÆµÎÀ̳ë Á¤Ç°À̾ú³×¿ä. °¡°Ýµµ ±ÂÀÔ´Ï´Ù. °è¼Ó ÀÌ °¡°ÝÀ¸·Î °ø±ÞÇØÁÖ¼¼¿ä~!
118
[Á¤Ç°] ¾ÆµÎÀÌ³ë µà¿¡ º¸µå Á¤Ç° (Arduino Due)
ºü¸¥ ¹è¼Û °¨»çÇÕ´Ï´Ù.
ºÀ±¸ 2013-04-01 ¡Ú¡Ú¡Ú¡Ú¡Ú
Áö³­ Åä¿äÀϳ¯ ¹Þ¾Æ¼­ Å×½ºÆ®ÇØ ºÃ½À´Ï´Ù.
¾Æ¸§´Ù¿î Á¤Ç° ¹Ú½º¿Í ¸ÞÄ«¼Ö·ç¼ÇÀÇ °ËÁ¤ ¹Ú½º·Î ¿ÏÀü Æ÷Àå ²Ä²ÄÈ÷ ÇØÁּ̳׿ä. Àß »ç¿ëÇÏ°í ±Ã±ÝÇÑ Á¡ ±â¼ú»ó´ã °Ô½ÃÆÇÀ¸·Î ¿©Â庸°Ú½À´Ï´Ù.
117
MPU-6050 3Ãà ÀÚÀÌ·Î ¼¾¼­ + GY521 3Ãà °¡¼Óµµ ¼¾¼­
»óÇ° Àß ¹Þ¾Ò½À´Ï´Ù.
½ÅÀçÇÏ 2013-03-27 ¡Ú¡Ú¡Ú¡Ú¡Ú
»óÇ°À» Àß ¹Þ¾Æ¼­, ¿¹Á¦´ë·Î ÇÏ´Ù ¸Þ°¡º¸µåÀÌ´Ùº¸´Ï Á¶±Ý Çì¸Å¿³³×¿ä¤¾.
116
´Üü ÁÖ¹®Çß´ø »ç¶÷ÀÔ´Ï´Ù.
ÀÌÁø¿µ 2013-03-26 ¡Ú¡Ú¡Ú¡Ú¡Ú
¹°°Ç Àß ¹Þ¾Ò½À´Ï´Ù. ºÎŹµå·È´ø ¿µ¼öÁõµµ ²Ä²ÄÈ÷ º¸³»Áֽðí,
Ä£ÀýÇÏ°Ô »ó´ãÇØÁּż­ °¨»çÇß½À´Ï´Ù.^^
115
MPU-6050 3Ãà ÀÚÀÌ·Î ¼¾¼­ + GY521 3Ãà °¡¼Óµµ ¼¾¼­
°¡°Ýµµ ÁÁ°í,Ä£ÀýÇÑ »ó´ã °¨»çÇÕ´Ï´Ù.
Àü¿õºó 2013-03-26 ¡Ú¡Ú¡Ú¡Ú¡Ú
°¡°Ýµµ Àú·ÅÇÏ°í, Ä£ÀýÇÑ »ó´ã¿¡...
ÀÚÁÖ ¿À°Ú½À´Ï´Ù.¤¾¤¾
114
¹°°Ç Àß ¹Þ¾Ò½À´Ï´Ù.
±èÁ¤¼® 2013-03-26 ¡Ú¡Ú¡Ú¡Ú¡Ú
Á¦Ç° Àß ¹Þ¾Ò½À´Ï´Ù. ±¦Âú³×¿ä.
113
MPU-6050 3Ãà ÀÚÀÌ·Î ¼¾¼­ + GY521 3Ãà °¡¼Óµµ ¼¾¼­
¾ÆµÎÀ̳ë ÄÚµå ¸»°í AVR Code vision¿ë ÄÚµå´Â ¾î¶»°Ô µÉ±î¿ä
°ø´ë»ý 2013-03-21 ¡Ú¡Ú¡Ú¡Ú¡Ú
Á¦°¡ GPIO¸¦ ÀÌ¿ëÇÏ¿© ¾Æ·¡ °°Àº Äڵ带 ®´Âµ¥..
µ¥ÀÌÅ͸¦ ÀÐÁö¸¦ ¸øÇÏ³×¿ä ¤Ð.¤Ì
0°ª¸¸ ¹Þ°í ÀÖ½À´Ï´Ù.

#include <mega128.h>
#include <delay.h>
#include <stdio.h>

#define SDAO PORTB.0 //Data Out port Á¤ÀÇ
#define SDAI PINB.0 //Data In port Á¤ÀÇ
#define SCL PORTB.1 //SCL port Á¤ÀÇ
#define MODE DDRB.0 //Æ÷Æ®B.0ÀÇ ÀÔÃâ·Â °áÁ¤
#define IN 0;
#define OUT 1;


void Init_USART0(void); //UARTÅë½Å ÃʱâÈ­
void putch_USART0(char data); //¹®ÀÚÇϳªÀü¼Û
void puts_USART0(char *str); //¹®ÀÚ¿­Àü¼Û

void StartI2C(void); //½ºÅ¸Æ® ½ÅÈ£ S
void StopI2C(void); //½ºÅ¾½ÅÈ£ P
void SendAck(void); // ACK ¸¶½ºÅÍ -> ½½·¹À̺ê (¾ÆÆ®¸Þ°¡128 -> MPU6050)
void SendNack(void); // NACK ¸¶½ºÅÍ -> ½½·¹À̺ê (¾ÆÆ®¸Þ°¡128 -> MPU6050)
void DATA_W(unsigned char); //µ¥ÀÌÅ;²±â AD+W, RA, AD+R µî¿¡ ¾²ÀÌ°í ½½·¹À̺꿡¼­ º¸³»ÁÖ´Â ACK¸¦ ¹Þ´Â ºÎºÐ±îÁö ÄÚµùÇÔ
unsigned char DATA_R(void); //µ¥ÀÌÅÍ Àб⠽½·¹À̺꿡¼­ DATA ¸¦ º¸³»ÁÖ¸é Àд º¸µå
void REG_R(unsigned char); // ¸ðµç ÇÔ¼ö¸¦ Çѹø¿¡ ½á¼­ µ¥ÀÌÅ͸¦ ¹Þ°ÔÇÔ

typedef union accel_t_gyro_union //ÀÚÀÌ·Î, °¡¼Óµµ µ¥ÀÌÅÍ º¯¼ö¸¦ ¹Þ´Â ±¸Á¶Ã¼
{
struct
{
unsigned char x_accel_h;
unsigned char x_accel_l;
unsigned char y_accel_h;
unsigned char y_accel_l;
unsigned char z_accel_h;
unsigned char z_accel_l;
unsigned char t_h;
unsigned char t_l;
unsigned char x_gyro_h;
unsigned char x_gyro_l;
unsigned char y_gyro_h;
unsigned char y_gyro_l;
unsigned char z_gyro_h;
unsigned char z_gyro_l;
} reg;
struct
{
int x_accel;
int y_accel;
int z_accel;
int temperature;
int x_gyro;
int y_gyro;
int z_gyro;
} value;
}ATG;

ATG atg; //µ¥ÀÌÅ͸¦ ÀúÀåÇÒº¯¼ö
char str[100];
void main(void){

Init_USART0();
DDRB = 0xff;
MODE = OUT;
PORTB.3 = 1; //¼¾¼­ÀÇ Àü¿ø

SDAO = 1; //ÃʱⰪ
SCL = 1; //ÃʱⰪ
while(1)
{
REG_R(0x3B); //·¹Áö½ºÅÍ ÁÖ¼Ò 0x3bºÎÅÍ ~0x48±îÁö µ¥ÀÌÅ͸¦ Àоî¿È


sprintf(str, "accel x:%f y:%f z:%f\r\ngyro x:%f y:%f z:%f\r\ntemp : %f\r\n",
atg.value.x_accel/16384, atg.value.y_accel/16384, (float)(atg.value.z_accel/16384), (float)(atg.value.x_gyro/131), (float)(atg.value.y_gyro/131), (float)(atg.value.z_gyro/131), (float)(atg.value.temperature/340));

puts_USART0(str);
}
}

void StartI2C(void){ //Start ÇÔ¼ö
MODE = OUT;
SDAO = 1;
SCL = 1;
delay_us(5);
SDAO = 0;
delay_us(5);
SCL=0;
}

void StopI2C(void){ //Stop ÇÔ¼ö
delay_us(5);
SCL = 1;
delay_us(5);
SDAO = 1;
delay_us(5);
}
void SendNack(void){ //Nack Àü¼Û ÇÔ¼ö
MODE = OUT;
delay_us(5);
SDAO = 1;
delay_us(5);
SCL = 1;
delay_us(10);
SCL = 0;
delay_us(5);
SDAO = 0;
}

void SendAck(void){ //Ack Àü¼Û ÇÔ¼ö
MODE = OUT;
delay_us(5);
SDAO = 0;
delay_us(5);
SCL = 1;
delay_us(10);
SCL = 0;
delay_us(5);
SDAO = 1;
}

unsigned char DATA_R(void){ //PIN¸ðµå·Î Àüȯ ÈÄ µ¥ÀÌÅÍ ¹Þ±â
unsigned char i;
unsigned char temp = 0x00;
MODE = IN;
delay_us(5);
for(i = 0; i < 8; i++){
temp <<= 1;
SCL = 1;
delay_us(5);
if(SDAI){
temp |= 0x01;
// puts_USART0("1");
}
else {
// puts_USART0("0");
}
SCL = 0;
delay_us(5);
}
//puts_USART0("\n\r");
return temp;
}

void DATA_W(unsigned char data){ //PORT¸ðµå·Î Àüȯ
unsigned char i;
MODE = OUT;
SCL = 0;
delay_us(5);
for(i = 0; i < 8 ; i++){
if(0x80&data) SDAO = 1;
else SDAO = 0;
data <<= 1;
delay_us(5);
SCL = 1;
delay_us(10);
SCL = 0;
delay_us(5);
}
SDAO = 1;
MODE = IN;
delay_us(5);
SCL = 1;

while(SDAI); //°ªÀÌ Åë°ú

delay_us(10);
SCL = 0;
delay_us(5);
}

void REG_R(unsigned char addr){ //ÃÖÁ¾ÀûÀ¸·Î ·¹Áö½ºÅÍ°ªÀ» Àоî¿À´Â ÇÔ¼ö.(°¡¼Óµµ, ¿Âµµ, ÀÚÀÌ·ÎÀÇ µ¥ÀÌÅÍ°ª)

StartI2C();
DATA_W(0xD0);
DATA_W(addr);
StartI2C();
DATA_W(0xD1);
atg.reg.x_accel_h = DATA_R();
SendAck();
atg.reg.x_accel_l = DATA_R();
SendAck();
atg.reg.y_accel_h = DATA_R();
SendAck();
atg.reg.y_accel_l = DATA_R();
SendAck();
atg.reg.z_accel_h = DATA_R();
SendAck();
atg.reg.z_accel_l = DATA_R();
SendAck();
atg.reg.t_h = DATA_R();
SendAck();
atg.reg.t_l = DATA_R();
SendAck();
atg.reg.x_gyro_h = DATA_R();
SendAck();
atg.reg.x_gyro_l = DATA_R();
SendAck();
atg.reg.y_gyro_h = DATA_R();
SendAck();
atg.reg.y_gyro_l = DATA_R();
SendAck();
atg.reg.y_gyro_h = DATA_R();
SendAck();
atg.reg.y_gyro_l = DATA_R();
SendNack();
StopI2C();
}

void Init_USART0(void)
{
UCSR0B=0x18; //¼Û¼ö½ÅÇã°¡
UCSR0A=0x00;
UCSR0C=(1<<UCSZ01)|(1<<UCSZ00); //Àü¼Û¹®ÀÚ±æÀÌ 8ºñÆ®
UBRR0H=0x00;
UBRR0L=0x08; //Àü¼Û¼Ûµµ 115200bps
}

void puts_USART0(char *str)
{
while(*str!=0){
putch_USART0(*str);
str++;
}
}


void putch_USART0(char data)
{
while(!(UCSR0A & (1<<UDRE0))); //µ¥ÀÌÅÍ ·¹Áö½ºÅÍ Áغñ°¡ µÇ¾ú´ÂÁö È®ÀÎ
UDR0=data; //Àü¼ÛÇÒµ¥ÀÌÅÍ Àü¼Ûµ¥ÀÌÅÍ·¹Áö½ºÅÍ¿¡ ¾²±â
}


112
MPU-6050 3Ãà ÀÚÀÌ·Î ¼¾¼­ + GY521 3Ãà °¡¼Óµµ ¼¾¼­
´äº¯ÀÌ µÉÁö ¸ð¸£°Ú³×¿ä.
2013-03-23
¾È³çÇϼ¼¿ä, Á¦°¡ »ç¿ëÇÑ ÄÚµå´Â ÀÎÅͳݿ¡¼­ ±¦ÂúÀº Äڵ带 º¸°í ¾à°£ÀÇ ¼öÁ¤À» ÇÑ °ÍÀÔ´Ï´Ù. ´ëºÎºÐÀÇ ÇÁ·Î±×·¡¸Ó´Â ´Ù¸¥ »ç¶÷µéÀÌ Â¥ ³õÀº Äڵ带 ÂüÁ¶ÇÏ°í »ç¿ëÇÏ´Ï ÀÌ ¹æ¹ýÀ» ¼±ÅÃÇÏ½Ã±æ ºÎŹµå¸³´Ï´Ù. ¹°·Ð ÀÌÇظ¦ ¹ÙÅÁÀ¸·Î Çؾ߰ÚÁö¿ä. ÄÚµåºñÁ¯À» »ç¿ëÇÏ½Å´Ù¸é ¾ÆµÎÀ̳ë¿ëÀ¸·Î ¸¸µé¾îÁø MPU6050Äڵ带 ¶óÀκ°·Î ¿Å°ÜÁÖ¸é µÇ°ÚÁö¸¸, °íµÉ °Í °°±â¿¡ ´ÙÀ½ÀÇ ¸µÅ©¸¦ °¡º¸½Ã±æ ¹Ù¶ø´Ï´Ù.
http://www.raspberrypi.org/phpBB3/viewtopic.php?t=22266

¾î¶² Ç÷§ÆûÀ» »ç¿ëÇÏ°í °è½Å°¡¿ä??
111
¾ÆµÎÀÌ³ë ¸Þ°¡ 2560 ȣȯº¸µå ATmega16u2(µå¶óÀ̹ö ÀÚµ¿¼³Ä¡) Arduino Mega 2560 R3
½¯µå¶û ¿¬°áÇÒ·Á´Âµ¥¿ä
À̽½¶ó¹Ì 2013-03-18 ¡Ú¡Ú¡Ú¡Ú¡Ú
Å×½ºÆ®Çؼ­ Àß µ¿ÀÛÇϴ°Š°°¾Æ¼­ ¾È½ÉÀÌ¿¡¿ä. ½¯µå¸¦ »ç·Á°í Çϴµ¥, ¸Þ°¡¿¡µµ Àû¿ëÀÌ µÇ´Â°ÇÁö...¸ÞÀÏ º¸³»µå·È´Âµ¥, È®ÀÎ ºÎŹµå·Á¿ä.
110
¾ÆµÎÀÌ³ë ¸Þ°¡ 2560 ȣȯº¸µå ATmega16u2(µå¶óÀ̹ö ÀÚµ¿¼³Ä¡) Arduino Mega 2560 R3
´äº¯ÀÔ´Ï´Ù.
2013-03-23
´ëºÎºÐ Àû¿ëÀÌ µË´Ï´Ù. ¾î¶² ½¯µå¸¦ »ç¿ëÇϽ÷Á´ÂÁö ¸»¾¸ÇØÁֽøé Á¤È®ÇÑ ´äÀ» µå¸± ¼ö ÀÖÀ» °Í °°½À´Ï´Ù.^^
°ßÀû¿äû
±¸¸Å´ëÇà
Äü/¹æ¹®¼ö·É
ÈĺҰáÁ¦
±â¼ú¹®ÀÇ