Forum Replies Created
-
AuthorPosts
-
MichaelKeymaster
No, that just won’t work. They’d be fighting over the same pins.
MichaelKeymasterSometimes the pins from the shield don’t make good contact with the Arduino headers. Bending them slightly in one direction or the other can fix that.
MichaelKeymasterI’ve used electret microphones with no problem. It needs to be powered, of course. See https://nootropicdesign.com/projectlab/2013/07/05/electret-microphone-audio-hacker/
The microphone you are linking to above will not work because it has 4 conductors on the plug. that is a TRRS plug. The audio Hacker needs an input with 3 conductors, TRS (tip, ring, sleeve).
MichaelKeymasterHi Sujan,
This is not a coding error. The closed caption decoding works by detecting the flashing white bars. It’s not going to be perfect every time. Imagine how hard it is to detect every character byte that is displayed on the screen with the white bars as the bits. It’s quite a miracle that you can decode *any* of the caption data. Many people cannot get it to work at all. You are doing quite well!
-Mike
MichaelKeymasterYes, it reduces the amplitude of the echo signal by half. Shifting to the right by one bit is division by 2. It’s the same as:
echo = echo / 2;
but faster.
You can try reducing by a smaller amount, but it will require expensive math operations. If the math takes too long, the code doesn’t have enough time to run.
Try dividing by 1.5:
echo = ((echo >> 1) + echo) >> 1;
This is the average of echo and echo/2, which is effectively echo/1.5. I’m not sure how many cycles this operation will take, so you might want to reduce your sample rate to give the loop more time.
MichaelKeymasterIt will work with an Uno even with the ICSP header in place. In fact, I just tested that to make sure I was remembering correctly.
There are 100 ohm resistors on two of the SPI lines for stability, and when using an ICSP header, these resistors are effectively bypassed, but it still works. I have not had problems.
MichaelKeymasterSure, what are the 3 pixel count values you would like? Defaults are currently 60, 120, 180.
MichaelKeymasterSorry, there’s no enclosure. I always meant to design one but have never had time.
As for signaling the Lumazoid with tones, I don’t think it is possible, especially if it is a high frequency with all kinds of other audio layered on top of it. This is far too primitive for that. Sorry, not feasible, or at least not something I can work on at the moment.
MichaelKeymasterYeah, the problem with I2C is that the I2C pins (A4, A5) are not connected to any pads on the Lumazoid. SPI can work, as long as you know how to write an SPI slave on the other Arduino. Yes, you can use A2 or A3 for the SS pin.
The Lumazoid code runs as fast as it can, sampling audio, performing the FFT, and then updating the LEDs. Now you will be also communicating data to the second Arduino, but SPI should be pretty fast, so it may not cause a performance issue. Give it a try!
MichaelKeymasterYes, the pots are linear. Yes, those trimpots will work well enough. They are cermet pots, which like I said are not as precise and smooth, but it will be fine.
MichaelKeymasterYes, the pots are 10K, and trimpots will work, but I have found cermet trimpots to have much less “resolution” and values jump around a lot. They don’t have a smooth transition of resistance like a larger pot.
If your audio input only has 1 channel, then you don’t need the summing circuit (R4, R5). You do need C7, as this capacitor blocks DC current.
MichaelKeymasterThe Lumazoid pots are 10K.
MichaelKeymasterChange N_LEDS to 30.
uint8_t N_LEDS = 30;
Some of the visualizations may not work right, but that is the first thing to try. The visualizations are designed to work with a minimum of 60 total LEDs, but some may work with 30.
MichaelKeymasterYes, it can be done. You’d need to implement a serial communication interface between the Lumazoid and another Arduino. The Lumazoid is really just an Arduino Uno. The 6-pin connector at the top of the Lumazoid board is for serial programming with an FTDI adapter if you want to change the code on it. The pinout is standard, just google for “FTDI pinout”.
So a solution could be built where the Lumazoid listens for serial input occasionally (this would interrupt the constant reading of the audio input). The Lumazoid could also write to serial telling you what mode it’s in.
Probably a simpler approach is to use the A2 and A3 pins that are broken out to pads. You could use one for additional input, giving different analog values that have different meanings.
I guess it’s not that easy… 🙂
MichaelKeymasterYou are clearing the screen immediately after you display something to it. That is why you are not seeing anything.
Move tv.fill(0) so you clear the screen BEFORE you write your output.
tv.fill(0); tv.print(0, 0, s);
-
AuthorPosts