Go Down

Topic: Help! with digitalWrite function (Read 1 time) previous topic - next topic

I didn't know where to post this since the software forum is read-only, hope this is okay.

I want to know if there's an "equivalent" code in C for the digitalWrite, analogRead and Serial.Print functions. I'm making a program that can read the values of a 3-axis accelerometer and it worked on the Arduino-0022. But I need to do it in AVR Studio, so I need to "translate" this code to C.

Can anyone help me with this? I'm new with Arduino. I have the Arduino Uno with the ATMega328p.

Thanks!

Grumpy_Mike

Quote
the software forum is read

No it is not. That is the old forum, look at the top of the page second down.

To output something you just write to the correct address, see:-
http://www.arduino.cc/en/Reference/PortManipulation

bilbo

Why not just include the relevant arduino header files? Then there's no porting necessary!
Alice asked the Chesire Cat, who was sitting in a tree, "What road do I take?"
The cat asked, "Where do you want to go?"
"I don't know," Ali

Go Up