New lower price for Axon II ($78) and Axon Mote ($58).
0 Members and 1 Guest are viewing this topic.
A function is an independent section of program code that performs a certain task and has been assigned a name. By referencing a function's name, your program can execute the code in the function. The program also can send information, called arguments, to the function, and the function can return information to the main part of the program.
#include <avr/io.h> // include I/O definitions (port names, pin names, etc)
In microcontroller it's not so easy. You donít have screen to show output
The LCD interface consumes many of the I/O pins.
The LCD screen on the AVR butterfly doesn't communicate to the MCU through the UART. I'm guessing it uses a parallelmethod of communication since wikipedia says QuoteThe LCD interface consumes many of the I/O pins.and UART communication only uses 2 pins.
QuoteThe LCD screen on the AVR butterfly doesn't communicate to the MCU through the UART. I'm guessing it uses a parallelmethod of communication since wikipedia says QuoteThe LCD interface consumes many of the I/O pins.and UART communication only uses 2 pins.Most LCDs today use the UART, so yeap you can normally use it. However, it appears the avr butterfly does not use the uart for the LCD . . .As for programming in C . . . try this compiler:http://www.bloodshed.net/download.htmlAnd my code to do the wavefront algorithm simulation using that compiler:http://www.societyofrobots.com/downloads/wave_front_simulation_software.zipIt should make sense if you stare at it for awhile . . . its well commented code . . .First just try compiling the code without changing anything. Then make changes here and there to see how the output changes.
admin thats a pretty cool code. but I'm gona stick with hello world for now
since I'm gonna be useing this mainly for robots, wouldnt it be better getting avr studio?
Quotesince I'm gonna be useing this mainly for robots, wouldnt it be better getting avr studio?dev c++ can't compile for microcontrollers (at least to my knowledge).you must use gcc, which is what AVR Studio uses.
The reason is that any advanced levels of C work for computers but not necessarily from mcu compilers. In the same vein it is likely that you will learn a lot from the BASIC languages and then use this knowledge for C development. A lot of C type things in books specialise in graphics and sound and computer i/0 - you dont actually need these and they are dependant on the computer platform that you are using. For MCU's it is only the very basic structures of the language.
i will once i get teh $50 robot up and runningwith dev c++ i was able to compile and link the hello world, but couldnt execute it in xp nor vista nor cmd it just didnt do nothing