Show Posts
|
|
Pages: [1] 2
|
|
1
|
Using Arduino / Programming Questions / Re: Help! Analog Comparator+Interrupt Rising Edge
|
on: September 13, 2011, 12:53:57 pm
|
Sorry, here's it: ACSR = (0<<ACD) | // Analog Comparator: Enabled (0<<ACBG) | // Analog Comparator Bandgap Select: AIN0 is applied to the positive input (0<<ACO) | // Analog Comparator Output: Off (1<<ACI) | // Analog Comparator Interrupt Flag: Clear Pending Interrupt (1<<ACIE) | // Analog Comparator Interrupt: Enabled (0<<ACIC) | // Analog Comparator Input Capture: Disabled (1<<ACIS1) | (1<ACIS0); // Analog Comparator Interrupt Mode: Comparator Interrupt on Rising Output Edge
|
|
|
|
|
5
|
Using Arduino / Programming Questions / Re: Arduino serial prints strange character in between figures
|
on: August 23, 2011, 02:55:27 am
|
SerialPort stream = new SerialPort("COM8", 9600); //Set the port (com8) and the baud rate (9600, is standard on most devices)
void Start () { stream.Open(); //Open the Serial Stream } void Update () { string value = stream.ReadLine(); var values = value.Split(','); //Split incoming stream values on comma into arrays string path = @"c:\data\accelerometer.CSV"; if(!File.Exists(path)) { using (StreamWriter sw = File.CreateText(path)) { while (value sw.WriteLine(value); } } using (StreamWriter sw = File.AppendText(path)) { sw.WriteLine(value); } }
|
|
|
|
|
11
|
Using Arduino / Programming Questions / Re: Need help in reading the com port
|
on: June 01, 2011, 06:17:13 am
|
|
I'm trying to simulate a process for a virtual simulator system. So instead of connecting actual sensors to the arduino, and have it send the readings to an external application(a game engine), I wrote a random number generator on the arduino, and had it written to the com port. And it works fine in the external application. Now, I need to also get some values from the external application, and send it to arduino. I already did that too. The only thing left is for Arduino to read these values Thanks
|
|
|
|
|
14
|
Using Arduino / Programming Questions / Need help in reading the com port
|
on: June 01, 2011, 04:17:38 am
|
|
I'm a beginner in programming and I made my Arduino to write to an external program through com8. Now the external program (also in c#) is also writing back to the same com8. I need help in reading this values on the arduino board i.e. I want to be able to write to com port and read the external values that is coming to com port at the same time.
|
|
|
|
|