Show Posts
Pages: 1 2 [3] 4 5 ... 57
31  Using Arduino / Project Guidance / Re: Exiting a series of for loops upon receiving an IR signal on: April 13, 2013, 04:31:29 pm
A proper IR library would have you connect the IR receiver to an interrupt pin. Just sitting there waiting for an IR input without being able to do anything else would be useless. Upon an interrupt, it would break out of any loop to go and service the interrupt before returning to the loop. So, within the interrupt routine, you would set a global state based on the received key and within your loop you would always test this state and what your loop does depends on the state. This way, it would respond to your keypresses. It may finish one iteration of the loop before "appearing" to respond (and that may be a while with using delays), but on the next iteration, it will act on the new state.
32  Using Arduino / Microcontrollers / Re: The mighty 1284p bootloader on: April 13, 2013, 04:02:47 pm
Not sure. From the datasheet, it would appear that the device signatures for the 168PA and PU are the same. If you try to run it at 20Mhz with the normal bootloader, some of your timing may be off. Certainly the timers will be off in your arduino code. The cores are designed for 8 and 16 only. So it will work, but you may run into strange problems.
33  Using Arduino / Microcontrollers / Re: The mighty 1284p bootloader on: April 13, 2013, 03:22:27 pm
Too late. You already did it. lol

Yes, it looks like it worked.
34  Using Arduino / Microcontrollers / Re: The mighty 1284p bootloader on: April 13, 2013, 03:20:34 pm
Yes, hit G and it will upload the correct bootloader. Be aware that this is going to set your fuses for an external clock. So you will need to use an external clock after you disconnect this setup and try to use it on it's own.
35  Using Arduino / Microcontrollers / Re: Bootloader problems... take 2... on: April 13, 2013, 03:17:11 pm
There is no support for the ATtiny4313 in avr-gcc 4.3.2.  Which is distributed with the standard Arduino IDE 1.0.4 or 1.5.2.  You will need to update to avr-gccc 4.3.3 which is included in WinAVR 20100110 package.

I tried this before to get it to work.

Good info. BTW, is there a guide to upgrading the AVR toolchain into the Arduino IDE? I know it's pretty much just copying files over, but some of the Arduino files look modified. What should get copied over and what shouldn't?
36  Community / Exhibition / Gallery / Re: Tip of Today: Build your own Multipin Connector on: April 13, 2013, 03:12:58 pm
Eyes though? How on earth do you get glue in your eye?

(Well, maybe you're a girl. Girls put all sorts of weird stuff in their eyes without reading warning labels)

Funny! The only example I can give of someone getting glue in their eye just so happened to be a girl. She was using superglue which was plugged up and after trying to clear the plug, she pointed it at her eye to see if it was coming out and it wasn't so she squeezed it harder. Well, it came out... with a spurt, right into her eye.

 (let's not move this into the
37  Community / Exhibition / Gallery / Re: Build Marx generator with Arduino, need help on: April 13, 2013, 03:03:47 pm
Using a voltage divider of 1M and 10K, you would reduce 40Kv down to 400V which could be read by most decent meters. Wouldn't this be acceptable, or no?
38  Using Arduino / Microcontrollers / Re: The mighty 1284p bootloader on: April 13, 2013, 02:54:15 pm
If you are using Nick's then this sketch is self-contained.  To run it you need open the Serial Monitor window at 115200 baud.

Of course.... I overlooked that part. Using Nick's sketch, he doesn't select a programmer at all. All commands are done via the serial port.
39  Using Arduino / Microcontrollers / Re: The mighty 1284p bootloader on: April 13, 2013, 02:41:32 pm
Did the chip detector portion of the tutorial work ok?
40  Using Arduino / Microcontrollers / Re: The mighty 1284p bootloader on: April 13, 2013, 02:26:32 pm
Can you post a link to Nick's tutorial and also the exact message you are getting?
41  Using Arduino / General Electronics / Re: Trying to understand a simple flashlight circuit on: April 13, 2013, 02:15:08 pm
Actually, I spoke incorrectly. In the AVR, the BOD does generate a reset. So in the case of the AVR, it would not function as I described. One would have to set the current state to EEPROM, then upon a reset, check that state. Though, you would eventually wear out the eeprom this way.

The way you are planning would work better for the AVR. As a suggestion, use the analog comparator (AIN0 and AIN1) to monitor your voltage which will generate an interrupt when the voltage drops. Otherwise, you have to keep polling the analog pins and hope you catch the drop fast enough before the cap discharges to the point of resetting the AVR.

42  Using Arduino / Project Guidance / Re: soft circuit hugging dolls and transceivers on: April 13, 2013, 01:46:43 pm
Using the example in the maniacbug library...

    if ( radio.available() )

If that tests TRUE, it means it received "something" which you could use by itself to trigger your action. Or if you need to know what 'something' is:

OK = something, len_something);

OK will just be an indactor that read was successful. But len_something number of bytes received will be in variable something.

on the transmit side:
bool ok = radio.write( something, len_something );

Of course, there is a bit more to it than that, but that is the core of it. You send something on one side, and receive it on the other. Look at the led_remote example in the RF24 library
43  Using Arduino / Project Guidance / Re: can somebody help me write arduinoprogram on: April 13, 2013, 12:33:08 pm
Your code is riddled with all kinds of logical errors, and not even close to functioning code. But the reason that you are only getting "2" is because this:


The only thing you are sending over the serial port is the value of buttonstate. And that isn't including the pot values at all.

This is what you probably should be sending:
char msg[5] = {analogRead(POT1)>>6,analogRead(POT2)>>2,analogRead(POT3)>>2,b1,b2};

But, you are also using the buttonstate variable inconsistently. First you are packing the bits with two different button statuses, but then you are changing it with only button1.
44  Using Arduino / Project Guidance / Re: Please evaluate and educate. First post on: April 13, 2013, 12:18:14 pm
Where do we stop?

Where we start and where we stop is a personal subjective choice we all make for ourselves, lets leave it at that.


Fair enough smiley My personal and subjective choice is to give people the information they are asking for and leave it up to them as to what they do with it and not to assume the audience is incapable unless they tell me that they are.

If I give the wrong information, please correct me. I certainly don't know everything and I am not always right. But please don't tell me what information is safe to give or not. Is that fair to ask?
45  Using Arduino / Microcontrollers / Re: Bootloader problems... take 2... on: April 13, 2013, 11:57:52 am
I don't suspect that you will have any problems running this in 1.5 now that it is working.

For the 4313, you should be able to use the same resources meant for the 2313 (the main difference is just 4K of flash versus 2K). The bootloader should work, but you will need to modify the boards.txt file just a bit. The tinycore and variant file meant for the 2313 *should* work. If not, it should only require a few minor changes.

I will look into this, as the 2313 is actually one of my favorite chips to use (I used them a ton before starting to mess with the Arduino) and I have been meaning to dig into getting Arduino running on them. I have about 20 of them sitting right here.
Pages: 1 2 [3] 4 5 ... 57