Show Posts
Pages: [1]
1  Forum 2005-2010 (read only) / Bugs & Suggestions / Samples in reference pages to print command on: August 01, 2008, 08:52:31 am
In the extended reference pages there is some sample code to show use of the print command which can be monitored at the console, this code takes an analogue input on analog input 0 and outputs the value to the console using the serial print command.

Here is the bit of code I am referring to...

 Serial.print("\t");                // print a tab character
  Serial.print(analogValue/4, BYTE); // print as a raw byte value (divide the
                                     // value by 4 because analogRead() returns numbers
                                     // from 0 to 1023, but a byte can only hold values
                                     // up to 255)
  Serial.print("\t");                // print a tab character  

My comment or question relates to the statement about the byte command only being able to show values up to 255 which I am OK with, however if you run this code the arduino will output 10 bits of data for the analogue read command and show the value all the way up to 1023.
So I guess my question is;... is the analogue read command a special case as it presents data in a 10 bit (2 byte)   format or have I misinterpreted the way this serial print command is working?  

thanks - belphit.
2  Forum 2005-2010 (read only) / Syntax & Programs / Re: Multiple statements on one line. on: December 28, 2008, 05:59:51 am
Thanks mem; that should do nicely; also I get to learn more about arrays.

Cheers

belphit
3  Forum 2005-2010 (read only) / Syntax & Programs / Multiple statements on one line. on: December 27, 2008, 08:02:40 am
how can I make multiple statements to setup pins as outputs for instance without having to declare each pin and set it as output on separate lines?

belphit
4  Forum 2005-2010 (read only) / Interfacing / Re: Arduino multimeter on: February 14, 2010, 07:06:38 am
For Solar cells charging a battery I have used the LEM sensors, such as the LTS-6NP these are good for up to 6A DC or AC and are vey accurate. They output 0.625V to 2.5 volts for full scale also they can be configured so that you do not need to interrupt your measued circuit as they use a current transformer, no shunt required. The other nice thing is that they can go positive and negative for the current flow so you can measure charge and discharge current with the same sensor.
You can download a datasheet at www.lem.com

Cheers

Peter B
5  Forum 2005-2010 (read only) / Interfacing / Re: reading crystal oscil using Arduino Duemilanove on: March 29, 2009, 05:48:14 am
If the Arduino is running with a clock of 4Mhz then what is the limiting factor on having it measure frequency?
Am I correct in assuming that Arduino programs "sketches" are compiled so should be almost as  fast as assembler is it just not possible to write code in such a way to be able to measure frequency above a few Khz?



6  Forum 2005-2010 (read only) / Exhibition / Re: My first CNC machine Arduino Mega controlled!!!! on: January 29, 2010, 08:09:57 pm
Nice work -  homebrew CNC is a  challenging project - you have a good working development model here.
Any chance you could share the documentation ?

Cheers  smiley
7  Forum 2005-2010 (read only) / Frequently-Asked Questions / Popular electronics magazine coverage for Arduino. on: March 13, 2009, 03:37:18 am
Have I missed something about Arduino that makes it a poor candidate for projects in the popular electronics press such as Elektor and other similar mags?

belphit.
Pages: [1]