Remove these ads by
Signing UpStep 1Overview
This instructable shows how to hack up an R/C car and connect it to your computer. I made a web interface for mine so that my mom could drive a little car around my room from north carolina (I'm in boston), using a webcam to watch it.
This is pretty fun project, takes about an hour to solder up, and if you can make toys computer controlled, you'll uh.....have lots of friends
Also, I'm writing an instructable on using an R/C car to make a digital radio link. Stay tuned, amigos.
-al
http://www.artiswrong.com
| « Previous Step | Download PDFView All Steps | Next Step » |









































===================================
#include <avr/io.h>
#include <inttypes.h>
#include <avr/interrupt.h>
#include <avr/signal.h>
uint8_t buffer[256];
uint8_t head=0;
uint8_t tail=0;
unsigned char noids[16];
unsigned char noids_index;
unsigned char flop;
char a;
char sel;
char o1;
void usart_putc(unsigned char c) {
// wait until UDR ready
//while(!(UCSR0A & (1 << UDRE0)));
UDR = c; // send character
}
void delay(int del)
{
int del1, del2, count;
for(count=0;count<del;count++)
for(del1=0;del1<20;del1++)
for(del2=0;del2<1000;del2++)
;
}
void uart_init()
{
UCSRA = (1<<RXC);
UCSRB = (1<<RXEN) | (1<<TXEN) | (1<<RXCIE);
UCSRC = (3<<UCSZ0);
UBRRH = 0;
UBRRL = 12; //4800 8n1
}
SIGNAL(SIG_USART_RECV){
a=UDR;
PORTB=a;
usart_putc(a+1);
}
int
main (void)
{
uart_init();
sei();
DDRB=255;
DDRC=255;
DDRD=255;
while(1)
{
}
return (0);
}
==============================================
i just want to ask your opinion about this code will it run in atmega32 because in my country i only can find this and i cant buy from digikey because i dont have any credit card
thanks
please reply me as soon as possible