Show Posts
Pages: 1 ... 60 61 [62] 63 64 ... 86
916  Using Arduino / Sensors / Re: 4 pin sound sensor on: December 16, 2012, 06:10:53 am
I meant what is the chip on you sensor board. Looks like there is something there in the photo behind the pot.
917  Using Arduino / Sensors / Re: 4 pin sound sensor on: December 16, 2012, 04:43:59 am
Some of this new information contradicts what you said before:
Quote
And I always has almost the same value (~155).
and
Quote
When I try digital output I always has LOW value

You are clearly getting a value of 90. Is that done by setting the pot of because the sound level changes? There is not much that can go wrong with this device, so if it still does not work it may be the IC on the board. What type is it?
918  Using Arduino / Programming Questions / Re: Newby question: falling edge of input switch on: December 15, 2012, 11:14:57 pm
The falling edge is just noticing that the input was 1 and then goes to zero.  You will need to set up a variable that remembers the current state each time through loop() and then acts when it sees the correct transition.

The blink without delay example will help you understand how to set up code to wait for a specified period without calling the delay function.
919  Using Arduino / Sensors / Re: 4 pin sound sensor on: December 15, 2012, 06:18:06 pm
There is not much to program and what you have seems like it would work.

Does the power LED light up when you connect Vcc? Does the sensor LED light up at all when you have a loud noise? As far as I know the AO should provide a voltage level that fluctuates with the sound level and the DO goes to HIGH briefly when the sound exceeds a certain threshold (set by the pot?).
920  Using Arduino / LEDs and Multiplexing / Re: I'm probably not ready for this matrix post, but you only live once... on: December 13, 2012, 01:46:43 am
The void means that the function does not return any value. If it returned an integer then the void would be replaced by int. It is part of the definition of functions in C++. If you intend to program it is worth looking at some of the online tutorials for hoe to use this programming language.
921  Using Arduino / Audio / Re: bike wheel controlling midi clock on: December 11, 2012, 05:28:10 am
I think an Arduino Uno would be sufficient.
922  Using Arduino / Audio / Re: bike wheel controlling midi clock on: December 08, 2012, 03:39:11 am
For any sensor, especially if it is a switch, you need to make sure that when the sensor is not 'on' that it is actually 'off' and not a floating input. This means that you will need to implement a pull down resistor as part of your circuit when the switch is not connected. Conversely, if you are planning a normally on switch, the logic is reversed and you need a pull up resistor as the switch will switch to zero volts.

For a mechanical switch you will also need to take care of switch bounce.

For both of these there are plenty of references in the forum and online.
923  Using Arduino / Audio / Re: bike wheel controlling midi clock on: December 07, 2012, 08:16:51 am
Yes you can.

You will need to mount some sort of sensor on the bike wheel to detect the rotation and then you can use the MIDI library in the playground to send a message through the MIDI ports.

You will need to create a serial interface that is compatible with the MIDI standards (easy). Just look in the Sound forum for info on this.
924  Using Arduino / General Electronics / Re: Hardware debouncing on: December 07, 2012, 08:13:39 am
This was where I learnt the most about debouncing: http://www.ganssle.com/debouncing.htm
925  Using Arduino / Programming Questions / Re: Blink without delay, extended to more complex switch patterns on: December 05, 2012, 02:13:13 am
My Multiblink example in the Playground uses a finite state machine and arrays of structures to keep track of multiple blink rates and timers. Not beginners code, but I am happy to help if you need it.
926  Using Arduino / Programming Questions / Re: Calculating the difference in a set of variables in percent on: December 04, 2012, 05:45:47 am
I think so. Try it.
927  Using Arduino / Programming Questions / Re: Calculating the difference in a set of variables in percent on: December 04, 2012, 05:26:39 am
If you use integer Mathis you end up with zero.int is ok for the counters, but you need to have floats for the calculated vars.
928  Using Arduino / Programming Questions / Re: For loops?? on: December 03, 2012, 04:29:53 am
You are changing the 'Board' to be the 85, right? You cannot just load Uno or other code into the 85 without selecting the right libraries.

In principle there is nothing in the code that assumes a specific processor and no direct to hardware code or oher tricks are used. What can change is the speed of the processor (MHz) and how the libraries are constructed for the new device.

When I compile my version for the Uno I get
Quote
Binary sketch size: 1,436 bytes (of a 32,256 byte maximum)

If I select the 85 my IDE will not even comple the code, and I see from the datasheet that it only has 512bytes of SRAM, so the code may not even fit if it could get it to compile.
929  Using Arduino / Programming Questions / Re: For loops?? on: November 30, 2012, 07:54:38 pm
Here is the explanation:
* MB_HIGH and MB_LOW are pretty obvious. They keep the LED on or off for the specified time.
* MB_LOOP makes the pattern loop back to the nominated array element in the pattern for the specificed number of times.

So the data
Code:
 { 3, 0, 0, {{MB_HIGH, 25, 0}, {MB_LOW, 25, 0}, {MB_LOOP, 3, 0}, {MB_LOW, 300, 0}}, 0 },
does this:
0 LED on for 25 ms
1 LED off for 25 ms
2 Loop back to element 0 and repeat it 2 more time (3 total)
3 LED off for 300 ms - this is just a delay while the 'other' LED does its thing

So if we want to have a paired LED that works in tandem with this one we need to have the logic
0 LED off for 300 ms - this is just a delay while the 'other' LED does its thing
1 LED on for 25 ms
2 LED off for 25 ms
3 Loop back to element 1 and repeat it 2 more time (3 total)

which provides to table entry
Code:
 { 4, 0, 0, {{MB_LOW, 300, 0}, {MB_HIGH, 25, 0}, {MB_LOW, 25, 0}, {MB_LOOP, 3, 1}}, 0 },

So if we look at them as a pair:
Code:
 { 3, 0, 0, {{MB_HIGH, 25, 0}, {MB_LOW, 25, 0}, {MB_LOOP, 3, 0}, {MB_LOW, 300, 0}}, 0 },
  { 4, 0, 0, {{MB_LOW, 300, 0}, {MB_HIGH, 25, 0}, {MB_LOW, 25, 0}, {MB_LOOP, 3, 1}}, 0 },

You can see that the second MB_LOOP (pin 4) is in a different spot in the sequence and it loops back to a different place in the array. That is because we need to add the initial delay to the second LED while the sequence for pin 3 is executing.

930  Using Arduino / General Electronics / Re: Desoldering a potentiometer on: November 25, 2012, 05:53:18 pm
The biggest problem with desoldering things this big is the amount of heat needed to do the job. Make sure your iron is hot hot and that you focus on one connection at a time, get it really nice and hot to make sure that all the solder is melted and then a solder sucker will be able to clear the hole well enough.

Reducing the amount of metal that needs to be heated up always helps, so cut off the pins as low as possible from the solder side.

You will find the big lugs are the hardest to get clear as they are probably connected to the ground plane on the PCB and you will be heating up a lot of the board in doing the job. Maybe a combination of heat gun for the board and soldering iron to heat up the connection?

Another approach - you may want to sacrifice the pot (which actually looks like a rotary encoder) and get another. That give you the option to snip it off from the component side. smiley
Pages: 1 ... 60 61 [62] 63 64 ... 86