Show Posts
Pages: 1 2 [3] 4 5 ... 279
31  Products / Arduino Yún / Re: Any open source / free alternative to Temboo? on: July 17, 2014, 07:35:14 am
I wrote this guide a long time ago, it's in italian and it's focused on the Arduino UNO + Eth/wifi shield.

That's an extensive guide, nice job (Google Translate did a fair job on it).

Do you run your own copy, or do you use theirs?
32  Using Arduino / Programming Questions / Re: pinMode or digitalWrite firrst.... on: July 16, 2014, 02:40:12 pm
Meant to add, there are no programming rules or conventions in this case, it's more a matter of choosing which gives the best transition for the attached circuitry. Karma always appreciated, thanks. Sometimes I use the attached diagram to visualize and determine the best transition from one state to the next. For any given state, one of the three other states can only be reached by transitioning through an intermediate state.
33  Using Arduino / Programming Questions / Re: pinMode or digitalWrite firrst.... on: July 16, 2014, 12:52:04 pm
Note that there are four possible states:

Output/High
Output/Low
Input/Pullup
Input/No Pullup -- this is the default state after reset

Since the input/output mode is set in the DDR (data direction register), and the output state (or input pullup resistor) is set in the PORT register, both cannot be changed simultaneously.

Therefore after a reset, it takes two steps to get to Output/High. It can be done with either code snippet as you showed. The first will briefly transition through the Input/Pullup state, and the second will briefly transition through the Output/Low state and will sink current at low impedance if a voltage is applied to the pin.

It may or may not make a difference to the connected circuitry. If it does, choose the most compatible path. In general, I would choose going through the Input/Pullup state (the first code snippet) unless I had a specific reason not to. Sounds like this is what you should do if a relay is involved, although the transition may be so fast that the relay is unable to respond for the brief transition through Output/Low.
34  Using Arduino / Programming Questions / Re: Is brown-out detection enabled on Arduino UNOs by default? on: July 15, 2014, 09:32:03 pm
The BOD setting is in the extended fuse byte and the setting in boards.txt,

Code:
uno.bootloader.extended_fuses=0x05

corresponds to the 2.7V level. I'm pretty sure this is the way my Unos were configured.
35  Using Arduino / Project Guidance / Re: SD Card Datalogging while running Interrupts on: July 15, 2014, 01:03:28 pm
I just did a project where input characters from the USART are buffered by an ISR, and when a buffer is full, I use sdfatlib to write it to an SD card. The write to SD is done in the mainline code (i.e. not the ISR) so there is a good chance that the sdfatlib code gets interrupted, probably repeatedly. I haven't seen any problems with this arrangement.
36  Using Arduino / Networking, Protocols, and Devices / Re: Problem for convert data received from XBee on: July 14, 2014, 04:41:38 pm
So do you want the ASCII representation in a character array? One way would be to use the dtostrf() function, documented here.

Code:
union floatByte_t {
    float f;
    byte b[4];
};

void setup(void)
{
    floatByte_t foo;
    foo.f = 24.10;
   
    Serial.begin(9600);
    Serial.print("\nASCII characters\t");
    Serial.println(foo.f);

    Serial.print("Four bytes, decimal\t");
    for (int i=0; i<4; i++) {
        Serial.print(foo.b[i], DEC);
        Serial.print('\t');
    }
    Serial.println();

    Serial.print("Four bytes, hexadecimal ");
    for (int i=0; i<4; i++) {
        Serial.print(foo.b[i], HEX);
        Serial.print('\t');
    }
    Serial.println();
   
    char ascii[16];
    dtostrf(foo.f, 5, 2, ascii);
    Serial.print("ASCII char array\t");
    Serial.print(ascii);
    char* p = ascii;
    while ( *p ) {
        Serial.print(' ');
        Serial.print(*p++, HEX);
    }
    Serial.println();
}

void loop(void)
{
}
37  Community / Website and Forum / Re: Nick Gammon on: July 14, 2014, 12:03:58 pm
A great loss to the forum and the community. Nick produced a great body of work, I hope he keeps his web site up.
38  Development / Suggestions for the Arduino Project / Re: Does Arduino have a future? on: July 14, 2014, 11:57:13 am
This means you will have very long occasional write latencies with SD cards on the SPI bus.

I think I noticed this while working on a recent project and wondered why it happened.
39  Products / Arduino Yún / Re: Any open source / free alternative to Temboo? on: July 12, 2014, 06:26:45 pm
@Jake, looking good there!. I've found GroveStreams to be very responsive to questions and issues. Bugs get fixed extremely quickly (I have found a few but I'd categorize all of them as minor or very minor) and emails from Mike Mills, the founder, are common. Mike is always looking to improve the service, and is genuinely interested in what users have to say, so don't hesitate to offer suggestions on the forum or via the email address on the support page.

Edit: I see you have °F and °C, that's a great example of the automation that GroveStreams offers. Only one of the two temperatures would need to be uploaded, then a derived stream could be created with the appropriate calculation.
40  Products / Arduino Yún / Re: Any open source / free alternative to Temboo? on: July 11, 2014, 02:53:26 pm
I've been using GroveStreams for many months now, and it's by far the best such service I've seen. Less than 20 datastreams and less than 10K transactions/month are free. Rates for higher levels of service are very reasonable. It has very powerful and flexible data analysis and reduction capabilities, automation/alerts, charting, etc. Here are a few charts from a project I've been working on.
41  Using Arduino / General Electronics / Re: My DS1302 RTC gets ahead of real time on: July 11, 2014, 12:45:35 pm
Could i use regular battery in my breakboard, which is made to use a rechargable coin cell? That is what i am asking, how to go about not using a rechargable coin cell battery.
Multimeter on battery pins on the board gives me 4.75V, so i guess i can't.
Or, could i use a 3.7 v li-ion 1090 mAh battery pack?

Depends on what else is in the circuit. Would really need to have a schematic for the board. DS3231 is fine with a 3V backup battery. See the circuit on the first page of the datasheet. Very simple, the battery just goes from the VBAT pin to ground. Again, not knowing the circuit for this particular board, but it may be possible to just remove whatever circuitry was involved with the rechargeable battery and connect a regular lithium coin cell directly to the DS3231 VBAT pin.

Datasheet says the VBAT voltage can be anywhere from 2.3V to 5.5V, with 3.0V being "typical". So a pair of AA or AAA cells would also work. But that would be gross overkill, as would a Li ion pack with 1090mAh capacity.
42  Using Arduino / General Electronics / Re: My DS1302 RTC gets ahead of real time on: July 11, 2014, 11:01:47 am
Temperature compensation seems to work very well here, although I haven't done any extreme tests. I have a couple gadgets with DS3231s sitting on window sills. They catch direct sun and in the winter probably are cooler than the rest of the house. They've been operating continuously since last fall sometime and are both within 5-10 seconds. Like I said, that's not an extreme test, but I've tried non-temperature compensated RTCs in those same locations and they drift a lot farther than the DS3231s, and also a lot farther than non-temp compensated RTCs in other parts of the house where temperature is more constant.

I use regular lithium coin cells for all my RTCs, including DS3231 and DS3232. I use CR2016 mostly, but also some CR1220 (which may be a bit on the wimpy side, but should still last for years). I hardly see the point in a rechargeable cell, estimates I've seen indicate that the regular lithium coin cells should last 5-7 years.
43  Using Arduino / General Electronics / Re: My DS1302 RTC gets ahead of real time on: July 11, 2014, 08:03:50 am
I got my cheap ds3231, this one is loosing 1-2 seconds a day. I remember you guys telling me this one can be calibrated by code. Where should I research that. Any pointers?

Everything is in the datasheet.

DS3231 has an aging offset register that allows the oscillator to be adjusted in approximate 0.1 ppm steps. It's an 8-bit register, so maximum adjustment is less than 13 ppm.
Stated accuracy for DS3231 is ±2ppm from 0°C to +40°C. This is about 0.17 seconds per day.
One second per day would be 11.6ppm, way out of spec.
The aging offset register can compensate for that, but not much more.
Good luck.
44  Using Arduino / Project Guidance / Re: Can an Arduino be powered by a Rochelle Salt Crystal? on: July 04, 2014, 11:52:06 am
@jremington, very cool stuff, thanks. I should have known!
45  Using Arduino / Microcontrollers / Re: Atmega328P-PU identifies itself as 328-PU on: July 04, 2014, 08:16:28 am
This sounds like another example of why I avoid eBay. I know what you mean though, I also wonder why someone would go through the trouble. Not sure what the going price is in the UK, but if I buy 10 from Mouser, they're under $3 each. Buy 25 and they're just over $2. I've never heard of mis-programming changing the signature bytes, I assume they are truly read-only (datasheet says they're in a separate address space). If somehow they can be written, then why not just change them back to what they're supposed to be. I would not assume that just because they run fine that they are fine. The only way to truly know would be to test them at and beyond the stated limits for temperature, supply voltage and clock frequency. In order to interpret the results of such tests, one would need information that probably only Atmel has. To the contrary, given that these chips have two strikes against them (suspicious origin, unexplained signature byte deviation), I would assume that they are not OK. I would not want one controlling some critical system in my car or in my F-22  smiley-wink
Pages: 1 2 [3] 4 5 ... 279