Show Posts
Pages: [1] 2 3 ... 291
1  Using Arduino / General Electronics / Re: 74hc595 - Connect leds with reversed polarity on: October 18, 2014, 06:17:56 pm
Connect the anodes to the positive supply. Connect the cathodes to the shift register outputs (through appropriate current-limiting resistors of course). Drive the shift register output LOW to illuminate the LED. This is inverted logic as compared to the other connection, i.e. anode to the shift register and cathode to ground. But the logic adjustment is easy to do in the code.
2  Using Arduino / Networking, Protocols, and Devices / Re: Trouble with both DS1307 and DS3231 RTCs and time slowing down on: October 18, 2014, 07:58:17 am
@irishcream24, glad to hear things are working. Do you have a theory as to what the specific problem was?

Didn't we have past discussion where it was shown that if the RTC was being accessed too frequently it would lose time because all the responding was keeping it from updating its time correctly?

Yes, that was a theory someone had. Thought I remembered testing it too, but couldn't remember the outcome. So I left a DS3232 running overnight, reading it as fast as possible (over 1400 times per second using 400kHz bus speed), and it's right on this morning. The test used the standard Arduino Wire library and my DS3232RTC library. A single read takes about 0.67ms, so it's not really being hit all that frequently. I'd think the RTC hardware would still have plenty of time to keep things updated internally. Mind you, I'm not suggesting that reading the RTC too often will affect timekeeping. In fact I rather doubt it as I have no evidence to support such a theory.
3  Using Arduino / Networking, Protocols, and Devices / Re: Trouble with both DS1307 and DS3231 RTCs and time slowing down on: October 17, 2014, 09:02:26 pm
I have introduced the I2C code again, and straight away the clock is 7 seconds slow. Very strange. So I still need to fix the issue of using I2C and this affecting the time. Any ideas?

This is confusing to me, because I am not aware of a way to communicate with a DS3231 (I think this is the RTC being used) without using I2C. That being the case, please explain what you really mean, and also how was the RTC interfaced before "introducing the I2C code again"?

Quote
Also, I read elsewhere, a few months back, that Nick Gammon wrote an alternative I2C library. However, I cannot find it again. Could someone point me in the right direction?

Maybe Nick will comment, I am not aware whether he wrote an alternate I2C library. I am aware that he linked an alternate library:
http://www.gammon.com.au/forum/?id=10896&reply=7#reply7

Having said that, I can't say that I've ever experienced the issues mentioned with the Wire library, and I use RTCs and I2C a fair amount. Also not sure how easy it is to lose an interrupt, seems like that should be exceedingly rare.
4  Using Arduino / Programming Questions / Re: How to tell if restart from WDT timeout on: October 13, 2014, 07:19:38 pm
I looked at the code in the post you linked too.  Where would I put that code, just in my main sketch?
It sounds like I would need to use optiboot 5.0a with my Uno.  Or am I misunderstanding this and I would have upload my program using an ISP and not have a bootloader at all - never tried that.

Complete but basic code here, and yes ISP programming is required (near as I can tell) to get an accurate copy of MCUSR for all conditions. An ISP is well worth having and learning to use.

The latest version of Optiboot will give a less-than-perfect representation of MCUSR when the reset occurred. This is an improvement over previous versions which gave none. If it's not required to distinguish between an external reset and a watchdog reset, I think Optiboot would work.
5  Community / Bar Sport / Re: Is this the worst instructable ever? on: October 13, 2014, 07:07:46 pm
Even if it worked, it should be called "how to use your arduino as a battery"

Haha, indeed, I was just thinking of all the cycles going to waste smiley-grin

In the Fritzing diagram, pin 13 appears to be shorted to ground.

The only way other people might be getting it to work is if two (or twenty) wrongs somehow make a right.
6  Using Arduino / Programming Questions / Re: How to tell if restart from WDT timeout on: October 13, 2014, 05:30:12 pm
Can't be done with the bootloader. External resets get reported as WDRF, not EXTRF; if you're using the WDT, that doesn't help. When I want the straight dope, I lose the bootloader. See discussion here:
http://forum.arduino.cc/index.php?topic=246359.msg1846659#msg1846659
7  Using Arduino / Sensors / Re: Temp sensor to Atiny85 on: October 11, 2014, 06:45:14 pm
A0 does exist, but it's on the Reset pin, so probably a lot of folks won't be using it.
8  Using Arduino / Sensors / Re: Temp sensor to Atiny85 on: October 11, 2014, 11:58:05 am
Please supply more information.
In what way does it not work? What does happen?
How is it wired?
Which ATtiny core is being used?
Is the ATtiny being programmed successfully (which programmer)?
Clock speed and operating voltage are good to know as well.

When posting code, use code tags (# symbol while composing) so the code looks
Code:
like this.

http://forum.arduino.cc/index.php/topic,148850.msg1118324.html#post_codetags
9  Using Arduino / Networking, Protocols, and Devices / Re: [Solved] XBee communication flawless on Uno, won't start on Pro Mini in circuit on: October 11, 2014, 06:58:16 am
W00T! Another real-life example for Grumpy Mike's page.

PS: Surely you moved the 100nF to the input?
10  Using Arduino / Networking, Protocols, and Devices / Re: XBee communication flawless on Uno, won't start on Pro Mini in circuit on: October 10, 2014, 07:33:16 pm
LF33 datasheet recommends 0.1µF on the input and 2.2µF on the output.

Ah! That's an information! Thanks a lot, Jack!  smiley-mr-green

Don't know if it's likely to be the problem, but it is definitely something I'd do.
11  Using Arduino / Networking, Protocols, and Devices / Re: XBee communication flawless on Uno, won't start on Pro Mini in circuit on: October 10, 2014, 02:21:58 pm
LF33 datasheet recommends 0.1µF on the input and 2.2µF on the output.
12  Using Arduino / Networking, Protocols, and Devices / Re: XBee communication flawless on Uno, won't start on Pro Mini in circuit on: October 09, 2014, 04:26:59 pm
What baud rate is used to communicate with the XBee? I don't use higher than 57600 with an 8MHz MCU.
13  Using Arduino / Microcontrollers / Re: Atmega decoupling AVcc and Vcc separately on: October 09, 2014, 04:17:26 pm
The datasheet recommends a 10µH inductor and a 100nF capacitor. I've started including this in my circuits (here is one example). I haven't gotten around to comparing the results from a circuit with the inductor to one without, but it's somewhere on my things-to-do list smiley-roll
14  Using Arduino / Networking, Protocols, and Devices / Re: Comcast blocks port 1080 inbound on: October 06, 2014, 07:16:23 am
1080 has (historically) been the target of several exploits. 

Thanks for the background!

Quote
3. Comcast don't only block 1080.  Apply the same logic to the other ports they are blocking and you cut off some very important services.

But it is the only port they block in the range 1024-65535 currently used by the Ethernet library. Avoiding use of blocked ports does not cut off any services as the change is only to the port range used by Ethernet client when selecting a source port for outbound traffic.

Quote
Adopting the IANA ephemeral port range might have legs.

Agree. I've made that change and am currently testing. All is well so far and I don't expect any issues. I've also submitted a pull request to Arduino to use the 49152-65535 ephemeral range. That way it is not ISP-specific and I think that ISPs will be very unlikely to block ports in that range.
15  Using Arduino / Networking, Protocols, and Devices / Re: Comcast blocks port 1080 inbound on: October 05, 2014, 12:19:49 pm
Quote
Port 1080 is vulnerable to, among others, viruses, worms and DoS attacks.

Just curious, what makes port 1080 more of an issue than other ports, and why would somebody specifically want to use port 1080?

Probably not the port per se, but maybe because some program that used or uses it had vulnerabilities. I see that 1080 is an officially assigned port for SOCKS proxy, but I'm not up on that or whether there are associated risks.
Pages: [1] 2 3 ... 291