Recent Posts

Pages: [1] 2 3 ... 10
1
It's pointless to discuss this without a schematic because you have already stated that you know little or nothing about electronics. If I start talking about "load switching device ratings" or "high side switching"
or "low side switching" of "gate threshold voltage" etc, etc, etc, how far is this discussion going to get , considering that not only is it unlikely (based on what you have said) that you have read the correct datasheet, it is more likely that you don't know what a datasheet is and have never read one.

We need to know that you are even in the right ball park.
Post a photo of a hand drawn schematic of the proposed circuit so we can at least determine if you are even in the "ball park" . An ATTiny 85 can drive a mosfet but we have not established whether it should be high side switching or low side switching or even if a mosfet is the correct device. I would use a small relay
driven by the ATTiny85. There are many small 5V relays available. Have you considered using one ?
2
General Electronics / Re: How to place resistor with...
Last post by Wawa - Today at 01:14 am
LEDs in parallel is sort of ok. Assuming one LED can take most or all the current.
If all LEDs are the same colour and from the same batch, then individual current/brightness is about the same.

But...
Different coloured LEDs have different working voltages, so if you put a red LED and a blue LED in parallel,
then only the red one with a lower Vf (working voltage) will be on.

Another problem, but mostly noticed with power LEDs, is that Vf is temp dependent.
A 'hotter' LED has a lower Vf, and draws more current than it's neighbour, making it hotter, drawing more current, ending up using most of the current that could be meant for two or more LEDs.

Resistors are not expensive. It's usually better to use one for each LED.
Leo..
3
A better way to stop the processor is to use a while(true); statement. Even better is to put all of your code in setup() and leave loop() empty.

It looks like you have a 1-second window when it's actually running and might accept an upload. Try starting the upload and then plugging it in so that you hit the one-second once the program is compiled. Or hit the reset button just before the upload starts.

If that doesn't work, do you have another Arduino to act as an ISP programmer?
4
Programming Questions / Re: Start/Stop for a process
Last post by MorganS - Today at 01:10 am
First you need to change your thinking. The Arduino processor never stops. It is always executing whatever instructions you give it at a fixed speed (16MHz for most Arduinos.) So while the Arduino appears to be stopped waiting for you to push a button it isn't actually stopped. It's just checking that button 16 million times per second.

The delay() function appears to stop the Arduino because it becomes unresponsive. But really it's looking at the clock a few million times per second and not looking at any other inputs.

Now check out Planning and Implementing an Arduino Program.

Converting your program away from using delay() might seem like a lot of unnecessary work but it will be worthwhile in the end.
5
The last sketch I uploaded into my ATMega32U4 added the command "exit (0) ;" to close the loop from running on and on... only ever since it's uploaded, I can't upload any new sketches to the board. Does anyone have any advice on what I can do? When I plug the board into a computer it still produces the text from the most recent program, so it's still on there, but I'm thinking that the exit command did more than I expected somehow and perhaps shut the board down after running it???? I was using ABRISP mkll to upload before, and still using it now to (not) upload.

Here's the sketch:


#include "Keyboard.h"
void setup() {
// put your setup code here, to run once:

}
void loop() {
// put your main code here, to run repeatedly:

Keyboard.begin();
delay(1000);
Keyboard.print(F("25k code was here but I replaced it with this text")) ;

Keyboard.end() ;
exit(0) ;

}


When I try to upload anything now, I get this error message:

Sketch uses 3620 bytes (12%) of program storage space. Maximum is 28672 bytes.
Global variables use 149 bytes (5%) of dynamic memory, leaving 2411 bytes for local variables. Maximum is 2560 bytes.


avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
Found programmer: Id = ""; type = �
   Software Version = .�; Hardware Version = �.�
avrdude: butterfly_recv(): programmer is not responding
Found programmer: Id = ""; type = �
   Software Version = .�; Hardware Version = �.�
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: error: buffered memory access not supported. Maybe it isn't
a butterfly/AVR109 but a AVR910 device?
avrdude: initialization failed, rc=-1
        Double check connections and try again, or use -F to override
        this check.

avrdude: butterfly_recv(): programmer is not responding
avrdude: error: buffered memory access not supported. Maybe it isn't
a butterfly/AVR109 but a AVR910 device?
avrdude: initialization failed, rc=-1
        Double check connections and try again, or use -F to override
        this check.

avrdude: butterfly_recv(): programmer is not responding
avrdude: error: programmer did not respond to command: leave prog mode
avrdude: butterfly_recv(): programmer is not responding
avrdude: error: programmer did not respond to command: leave prog mode
avrdude: butterfly_recv(): programmer is not responding
avrdude: error: programmer did not respond to command: exit bootloader
avrdude: butterfly_recv(): programmer is not responding
avrdude: error: programmer did not respond to command: exit bootloader
6
Project Guidance / Re: Sensor Output
Last post by bluejets - Today at 01:05 am
Unfortunately i dont have the datasheet or any schematic apout it. The sensor its 2 mics (Left and Right) which they end up on a small circuit.

How about a couple of clear photos then, that might help.
From description sounds like an ultrasonic tx/rx.
Or at least some device with open collector.....everyone is guessing...??
7
Hm, I do have that file, the project file is in a folder also has a folder called lib which has both these files inside:
8
Yes, on the condition that ALL the leds are IN SERIES.
9
Project Guidance / Re: Infrared Receiver + ST7735...
Last post by MorganS - Today at 01:01 am
You start the description talking about heat sources and then go on to identifying near and far. Unless you have military-level tech, you can only do one at a time. You can see heat sources (temperatures) or you can measure distance. The sensors to do those two tasks are very different.

If you're thinking of some kind of target-camera video then you should be aware that the Arduino doesn't have enough processing power for video.

However, the Panasonic Grid-Eye sensor is probably good enough for what you want and it's now available on a PCB from Adafruit. They have tutorials to show you how to hook it up to your Arduino. (They also have good LCD screens and good tutorials on those.)
10
Project Guidance / Re: Any way to Increase output...
Last post by Delta_G - Today at 12:59 am
Code: [Select]
exit(0) ;

Does that even do anything on an Arduino?
Pages: [1] 2 3 ... 10