Show Posts
Pages: 1 [2] 3 4 ... 289
16  Using Arduino / Sensors / Re: Weather on your Arduino on: August 25, 2014, 03:27:18 pm
Nice work! Good looking control panel. Bookmarked your blog. I hope you'll report back on how it performs over time.
17  Using Arduino / Networking, Protocols, and Devices / Re: Xbee sleep mode question on: August 25, 2014, 03:02:36 pm
Ah, I missed the multiple button requirement. Of course another alternative is adding a microcontroller for more flexibility.
18  Using Arduino / Sensors / Re: How to read DS3231 Internal temperature sensor, example code on: August 25, 2014, 02:57:35 pm
Does it go "negative binary"?

See http://en.wikipedia.org/wiki/Two%27s_complement
19  Using Arduino / Sensors / Re: How to read DS3231 Internal temperature sensor, example code on: August 25, 2014, 02:55:49 pm
This will handle temperatures below zero:

Code:
   const int DS3231_RTC_ADDR = 0x68;
    const int DS3231_TEMP_MSB = 0x11;
    union int16_byte {
        int i;
        byte b[2];
    } rtcTemp;
    
    Wire.beginTransmission(DS3231_RTC_ADDR);
    Wire.write(DS3231_TEMP_MSB);
    Wire.endTransmission();
    Wire.requestFrom(DS3231_RTC_ADDR, 2);
    rtcTemp.b[1] = Wire.read();
    rtcTemp.b[0] = Wire.read();
    long tempC100 = (rtcTemp.i >> 6) * 25;    //degrees celsius times 100
    Serial.print( tempC100 / 100 );
    Serial.print( '.' );
    Serial.println( abs(tempC100 % 100) );
20  Using Arduino / Sensors / Re: How to read DS3231 Internal temperature sensor, example code on: August 25, 2014, 02:13:40 pm
My gripe was with the blog item. The author ( I assume that wasn't you?  smiley-red  smiley-grin) seems to conclude that the two temperature sensors have comparable accuracy, which is what I take exception with. OTOH, if the DS3231 sensor is a good match for a particular application, then by all means use it!
21  Using Arduino / Sensors / Re: How to read DS3231 Internal temperature sensor, example code on: August 25, 2014, 01:51:22 pm

Foo. Anecdotal evidence. A sample size of one means nothing. The guy got lucky. Maxim pays one or more engineers six figures to arrive at the ±3°C spec; ignore the datasheet at your own peril. That blog post should at least have had a prominent YMMV.
22  Using Arduino / Networking, Protocols, and Devices / Re: Xbee sleep mode question on: August 25, 2014, 01:44:33 pm
Haven't looked into all the details, but wouldn't it just be a matter of putting the button on the sleep pin, configuring for pin sleep and cyclic sleep, then setting the sleep time (ST) to be shorter than the I/O sample rate (IR)? One I/O pin does need to be configured for sampling, but we don't care which or what its value is (probably a pullup resistor would be appropriate for minimum power consumption).

So the button should wake the module, send one I/O sample, then go back to sleep. As stated above, we don't care about "data", mere reception of the I/O sample means "the button was pushed".
23  Using Arduino / Sensors / Re: How to read DS3231 Internal temperature sensor, example code on: August 25, 2014, 01:29:57 pm
Here's an idea on how to avoid using float.

The MSB is an int, and the 2 bits of the LSB  represent quarter degrees as follows:

00=.00    01=.25    10=.50   11=.75

You should be able to use an if or switch case to display this value following the integer.

Except for temperatures below zero, 00 = 0.00, 01 = -0.75, 10 = -0.50, 11 = -0.25
24  Using Arduino / Sensors / Re: How to read DS3231 Internal temperature sensor, example code on: August 25, 2014, 01:23:33 pm
I'm curious why you guys want to access this temperature. It's the chip internal temp isn't it, for timing compensation?

Why not, it's a temperature. Not terribly accurate, ±3°C but better than nothing I guess.
25  Using Arduino / Sensors / Re: How to read DS3231 Internal temperature sensor, example code on: August 25, 2014, 11:59:24 am
This is how I do it.
26  Using Arduino / Networking, Protocols, and Devices / Re: Setting up X-bee network in API mode on: August 25, 2014, 07:20:30 am
Is it not possible to load DM firmware in S2 radios?

I was under the impression that it was, but reviewing Digi's web site I think that I was mistaken. Like you say, the S1 modules will support DM.

Don't give up on the S2 modules. Get Andrew Rapp's library. It is rather extensive so it takes a bit to get the hang of the object model. But it's really designed well and it works great. Have a look at the examples and the doxygen documentation that comes with the library. Here is code for a demonstration I gave recently. Not necessarily the best, I cobbled it together in a hurry from other projects, so FWIW.
27  Using Arduino / Networking, Protocols, and Devices / Re: Xbee sleep mode question on: August 24, 2014, 08:43:06 pm
I haven't tried it, but on page 91 of the XBee ZB product manual, it says:

Quote
IO Sampling
End devices can be configured to send one or more IO samples when they wake from sleep. To enable IO sampling on an end device, the IR command must be set to a non-zero value, and at least one analog or digital IO pin must be enabled for sampling (D0 - D9, P0-P2 commands). If IO sampling is enabled, an end device sends an IO sample when it wakes and starts the ST timer. It will continue sampling at the IR rate until the sleep timer (ST) has expired. See chapter 8 for details.
28  Using Arduino / Programming Questions / Re: how to make a attiny85 go to sleep? on: August 23, 2014, 05:20:27 pm
Jack thank you what i was trying to do is take as little power as i can while keeping the attiny85 in sleep or idle mode something i was going to use a button to wake it up just for a brief second or less then that but i forgot i had some PIR sensors so what i would like to do is add that to this project so when someone walks past it  the attiny comes out of sleep mode or idle mode and turns on a led problem is The PIR sensor takes power trying to make the battery last a long time its a 4.5v battery pack 3 double A batteries. trying to get it to last months if can.will the sleep mode help it?

Sleep mode will reduce power used by the microcontroller (power-down mode will save the most power, idle mode less so, see the datasheet).

Not knowing anything about this particular PIR sensor, it's hard to comment. If it can generate an interrupt, then it can bring the MCU out of sleep mode. If the sensor needs to be on continually, then it may draw too much power. I might consider having the MCU turn the sensor on and off at some regular interval, say half a second or whatever is just quick enough to catch someone walking by. If the sensor can be powered up and read in, say, a few milliseconds, then power use could be reduced by an order of magnitude, maybe more.
29  Using Arduino / Programming Questions / Re: random serial thoughts. on: August 23, 2014, 05:03:29 pm
Not with the standard IDE but you may be interested in http://bitlash.net/
[/quote
Jack,
would this stop Arduino IDE compiler to go crazy when I have HyperTerminal open and using it as test to my app?
It is getting annoying to keep restarting the terminal.
Cheers Vaclav

Unknown. I don't know the first thing about Bitlash, I am just aware of it. Try it and let us know.
30  Community / Exhibition / Gallery / Re: button bounce profiler on: August 23, 2014, 04:59:48 pm
What is the y-axis on the charts? I assume the x-axis is time, some tick marks would be helpful.
Pages: 1 [2] 3 4 ... 289