Show Posts
Pages: 1 ... 24 25 [26] 27 28 ... 115
376  Using Arduino / Sensors / Re: DS18B20 speed problem on: February 01, 2014, 05:47:45 pm
Presumably you have the device set for 12 bit precision. The datasheet says the conversion will take 750ms at that resolution. You've measured 854 - close enough.
If you want to speed up the conversion you can change to a lower precision. At 9 bits the conversion time is 93.75ms.

Pete
377  Using Arduino / Programming Questions / Re: nested loop(){} functions on: January 31, 2014, 07:47:45 pm
Quote
I want to use a loop(n) function
The loop function has a special meaning to the Arduino environment. Use a different name.

Quote
Can I nest loops?
You can't nest functions.

Quote
Do loops only accept char as a value?
No

To do something n times, use a for loop.

Pete
378  Using Arduino / Programming Questions / Re: Having trouble with rtc clock on: January 30, 2014, 04:15:25 pm
The oddball numbers, especially the 165 minutes, suggest to me that the code is not seeing the RTC. Have you tried running an I2C scanner just to make sure that the device is visible?

Pete
379  Using Arduino / Audio / Re: Arduino FFT code not expected results... on: January 30, 2014, 10:18:59 am
I told Judd about complex numbers back in November.
http://forum.arduino.cc/index.php?topic=198289.msg1464020#msg1464020

Pete
380  Using Arduino / LEDs and Multiplexing / Re: Teensy 3.1 problems with WS2801 on: January 29, 2014, 05:23:26 pm
You should post this on the Teensy forum.
http://forum.pjrc.com/forum.php

Pete
381  Using Arduino / Programming Questions / Re: calculation with ints to get Gps coordinates on: January 28, 2014, 11:07:12 am
You define "day" but then refer to it as "dagen" and the same problem for "min" and "sec".

The other problem is that you are doing the calculation with integers. For integer arithmetic in C/C++ there is no remainder, so 10/20 is zero - not 0.5.
You can either declare day,min, sec to be float, or force the calculation to be done with floating point:
Code:
float lat_out = ((float)dagen + (minuten/60.) + seconden) / (60*60);

Pete
382  Using Arduino / Sensors / Re: onewire and dallas libraries on: January 27, 2014, 07:55:28 pm
Code:
void printTemperature(DeviceAddress deviceAddress) {
This says that the printTemperature function requires one argument which must be of type DeviceAddress and in the function definition it will be referred to as deviceAddress. The definition of DeviceAddress in DallasTemperature.h means that the statement is exactly equivalent to:
Code:
void printTemperature(uint8_t deviceAddress[]) {
i.e. deviceAddress is a pointer to an array of unsigned characters, and specifically an array of length 8.

Code:
printTemperature (insideAddress);
This calls the function with an address which must have been defined, and filled in, earlier in the program.

Pete
383  Using Arduino / Audio / Re: Arduino FFT code not expected results... on: January 27, 2014, 07:45:56 pm
Why don't you just get your code working with an FFT library first? Then try writing your own.

Pete
384  Using Arduino / Sensors / Re: onewire and dallas libraries on: January 27, 2014, 11:10:33 am
DeviceAddress is defined in the library itself in the file DallasTemperature.h
Code:
typedef uint8_t DeviceAddress[8];

Pete
385  Using Arduino / Programming Questions / Re: 18B20 Temerature Sensor , 0.5c reading on: January 26, 2014, 04:15:51 pm
Or you can set the sensor to 9-bit precision which will give you half a degree accuracy.
Also, you should print the result like this:
Code:
Serial.println(Senzor1,1);
so that it only prints one fractional digit.

Pete
386  Using Arduino / Sensors / Re: About DS18B20 on: January 22, 2014, 10:23:57 am
The sensors don't all have to be on one pin. You could even have 5 separate buses with 9 sensors on each.

Pete
387  Using Arduino / Project Guidance / Re: Trying to write an event listener with Teensyduino 2.0 on: January 20, 2014, 04:32:28 pm
There is a Teensy forum here: http://forum.pjrc.com/forum.php

Pete
388  Using Arduino / Networking, Protocols, and Devices / Re: 1 Wire Bus experience on: January 18, 2014, 05:37:09 pm
Quote
When I tested the sketch

What sketch?

Pete
389  Using Arduino / Installation & Troubleshooting / Re: Arduino nano - serial transmitting very slow on: January 15, 2014, 09:29:27 am
The UNO serial port uses a hardware UART which restricts the speed to whatever baud rate you set.
I think the Leonardo uses the native USB transfer which is much higher.

Pete
390  Using Arduino / Programming Questions / Re: undefined reference to 'setup'/'loop' on: January 14, 2014, 07:49:18 pm
You have a loop function defined as:
Code:
void loop(unsigned long futuremillis)
Why?

You must have one defined as:
Code:
void loop(void)

Pete

Pages: 1 ... 24 25 [26] 27 28 ... 115