#16 – Sound
Project #16: Sound – SparkFun ProtoShield Kit – Mk23
——
#DonLucElectronics #DonLuc #Sound #Arduino #MicroOLED #ProtoShield #SparkFunQwiicMP3 #SparkFunRedBoardQwiic #Project #Programming #Electronics #Microcontrollers #Consultant
——
——
——
——
SparkFun ProtoShield Kit
The SparkFun ProtoShield Kit lets you customize your own Arduino shield using whatever circuit you can come up with and then test it to make sure everything is working the way it should. The SparkFun ProtoShield Kit is based off the Arduino R3’s footprint that allows you to easily incorporate it with favorite Arduino-based device.
One of our favorite features with this version of the ProtoShield Kit is the solderable-like breadboard prototyping area. Half of this area was designed with a breadboard in mind. On the underside of the shield you will be able to see open jumper pads between each through hole to make a connection like a breadboard. Once you add a component, simply add a solder jumper between holes to make a connection. For those that prefer the standard prototyping pads.
DL2301Mk04
1 x SparkFun RedBoard Qwiic
1 x SparkFun ProtoShield Kit
1 x SparkFun Micro OLED Breakout (Qwiic)
1 x SparkFun Qwiic MP3 Trigger
1 x microSD Card – 2GB
1 x Panel Mount 10K potentiometer
1 x Knob
2 x Rocker Switch – SPST (Round)
1 x Qwiic Cable – 50mm
1 x Qwiic Cable – 100mm
1 x Dayton Audio Reference 3″ Full-Range Drive
1 x SparkFun Cerberus USB Cable
——
SparkFun RedBoard Qwiic
PO1 – Analog A0
SDA – Analog A4
SCL – Analog A5
SW0 – Digital 8
SW1 – Digital 7
VIN – +5V
VIN – +3.3V
GND – GND
——
DL2301Mk04p.ino
/* ***** Don Luc Electronics © ***** Software Version Information #16 - Sound - SparkFun ProtoShield Kit - Mk23 16-04 DL2301Mk04p.ino 1 x SparkFun RedBoard Qwiic 1 x SparkFun ProtoShield Kit 1 x SparkFun Micro OLED Breakout (Qwiic) 1 x SparkFun Qwiic MP3 Trigger 1 x microSD Card - 2GB 1 x Panel Mount 10K potentiometer 1 x Knob 2 x Rocker Switch - SPST (Round) 1 x Qwiic Cable - 50mm 1 x Qwiic Cable - 100mm 1 x Dayton Audio Reference 3" Full-Range Drive 1 x SparkFun Cerberus USB Cable */ // Include the Library Code // Wire communicate with I2C / TWI devices #include <Wire.h> // SparkFun MP3 Trigger #include "SparkFun_Qwiic_MP3_Trigger_Arduino_Library.h" // SparkFun Micro OLED #include <SFE_MicroOLED.h> // SparkFun MP3 Trigger MP3TRIGGER mp3; int iSongCount = 0; int x = 0; // Volume int iVolume = A0; int iVolumeLevel = 0; // EQ Setting Normal byte bEQSetting = 0; // Play Next const int iPlayNext = 8; // Variable for reading the iPlayNext status int iPlayNextState = 0; // Play Previous const int iPlayPrevious = 7; // Variable for reading the iPlayPrevious status int iPlayPreviousState = 0; // SparkFun Micro OLED #define PIN_RESET 9 #define DC_JUMPER 1 // I2C declaration MicroOLED oled(PIN_RESET, DC_JUMPER); // iLED ProtoShield int iLED = 13; // Software Version Information String sver = "16-23"; void loop() { // SparkFun MP3 Trigger if (mp3.isPlaying() == false) { if ( x > iSongCount ) { x = 0; } else { x = x + 1; } // Play Track mp3.playTrack( x ); } else { // Volume isVolume(); // Play Next isPlayNext(); // Play Previous isPlayPrevious(); } // Micro OLED isMicroOLED(); }
getMP3.ino
// MP3 // Setup MP3 void isSetupMP3(){ // Check to see if Qwiic MP3 is present on the bus if (mp3.begin() == false) { // Qwiic MP3 failed to respond. Please check wiring and possibly the I2C address. Freezing... while (1); } if (mp3.hasCard() == false) { // Qwiic MP3 is missing its SD card. Freezing... while (1); } // Song Count iSongCount = mp3.getSongCount(); // EQ Setting // 0 Normal // 1 Pop // 2 Rock // 3 Jazz // 4 Classic // 5 Bass bEQSetting = 5; bEQSetting = mp3.getEQ(); // Initialize the iPlayNext pinMode( iPlayNext, INPUT); // Initialize the iPlayPrevious pinMode( iPlayPrevious, INPUT); } // Volume void isVolume() { // Volume iVolumeLevel = analogRead( iVolume ); // (0-1023 for 10 bits or 0-4095 for 12 bits) iVolumeLevel = map(iVolumeLevel, 0, 1023, 0, 10); // Volume can be 0 (off) to 31 (max) // Volume can be 0 (off) to 10 (Breakfast) mp3.setVolume( iVolumeLevel ); } // Play Next void isPlayNext() { // Read the state of the iPlayNext value iPlayNextState = digitalRead( iPlayNext ); if ( iPlayNextState == HIGH ) { mp3.stop(); if ( x > iSongCount ) { x = 0; } else { x = x + 1; } // Play Track mp3.playTrack( x ); } } // Play Previous void isPlayPrevious() { // Read the state of the iPlayPrevious value iPlayPreviousState = digitalRead( iPlayPrevious ); if ( iPlayPreviousState == HIGH ) { mp3.stop(); if ( x > iSongCount ) { x = 0; } else { x = x - 1; } // Play Track mp3.playTrack( x ); } }
getMicroOLED.ino
// SparkFun Micro OLED // Setup Micro OLED void isSetupMicroOLED() { // Initialize the OLED oled.begin(); // Clear the display's internal memory oled.clear(ALL); // Display what's in the buffer (splashscreen) oled.display(); // Delay 1000 ms delay(1000); // Clear the buffer. oled.clear(PAGE); } // Micro OLED void isMicroOLED() { // Text Display FreeIMU // Clear the display oled.clear(PAGE); // Set cursor to top-left oled.setCursor(0, 0); // Set font to type 0 oled.setFontType(0); // Song oled.print("Song"); // Song Name oled.setCursor(0, 13); String songName = mp3.getSongName(); oled.print( songName ); // Song Count oled.setCursor(0, 24); oled.print("Song Count"); // Song Count oled.setCursor(0, 37); iSongCount = mp3.getSongCount(); oled.print( iSongCount ); oled.display(); }
setup.ino
// Setup void setup() { // Initialize digital pin iLED ProtoShield as an output pinMode(iLED, OUTPUT); // Turn the LED on (HIGH is the voltage level) digitalWrite(iLED, HIGH); // Wire communicate with I2C / TWI devices Wire.begin(); // SparkFun MP3 Trigger Setup isSetupMP3(); // Setup Micro OLED isSetupMicroOLED(); }
——
People can contact us: https://www.donluc.com/?page_id=1927
Technology Experience
- Programming Language
- Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi,Espressif, etc…)
- IoT
- Wireless (Radio Frequency, Bluetooth, WiFi, Etc…)
- Robotics
- Camera and Video Capture Receiver Stationary, Wheel/Tank and Underwater Vehicle
- Unmanned Vehicles Terrestrial and Marine
- Machine Learning
- RTOS
- Research & Development (R & D)
Instructor, E-Mentor, STEAM, and Arts-Based Training
- Programming Language
- IoT
- PIC Microcontrollers
- Arduino
- Raspberry Pi
- Espressif
- Robotics
Follow Us
Luc Paquin – Curriculum Vitae – 2023
https://www.donluc.com/luc/
Web: https://www.donluc.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/@thesass2063
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/
Don Luc
Project #16: Sound – Metronome – Mk22
——
#DonLucElectronics #DonLuc #Sound #Metronome #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant
——
——
——
——
Metronome
A metronome is a device that produces an audible click or other sound at a regular interval that can be set by the user, typically in Beats Per Minute (BPM). Metronomes may include synchronized visual motion. Musicians use the device to practise playing to a regular pulse. In the 20th century, electronic metronomes and software metronomes were invented.
Musicians practise with metronomes to improve their timing, especially the ability to stick to a regular tempo. Metronome practice helps internalize a clear sense of timing and tempo. Composers and conductors often use a metronome as a standard tempo reference, and may play, sing, or conduct to the metronome. The metronome is used by composers to derive beats per minute if they want to indicate that in a composition. Conductors use a metronome to note their preferred tempo in each section.
SparkFun Metro-Gnome
The SparkFun Metro-Gnome is a basic digital metronome used to keep time during music practice. This is a basic kit that goes together in 15-20 minutes for people learning to solder, and 5-10 minutes for those with a bit of experience.
DL2301Mk03
-1 x Metro-Gnome PCB
-1 x ATmega168
-2 x 7-Segment Red LED
-1 x 10uF Capacitor
-1 X 0.1uf Capacitor
-1 x 10k Resistor
-1 x 1N4148 Diode
-1 x Piezo Speaker
-1 x Mini Power Switch
-2 x Push Button Reset Switches
-1 x Battery Holder Pack
-4 x AA Alkaline Battery
ATmega168
Metro-Gnome
VIN – +6V
GND – GND
——
Metrognomev03
Metrognomev03.c
// Metronome-v03 #define F_CPU 1024000 // Adjust this to get the clock more precise #include <avr/io.h> #include <util/delay.h> #include <avr/interrupt.h> #define BUZZER1 1 #define BUZZER1_PORT PORTB #define BUZZER2 2 #define BUZZER2_PORT PORTB #define sbi(port_name, pin_number) (port_name |= 1<<pin_number) #define cbi(port_name, pin_number) ((port_name) &= (uint8_t)~(1 << pin_number)) uint16_t countUp = F_CPU/1024; // Dividing clock by 1024 uint16_t speed = 60; // Program initially runs at 60 BPM uint8_t leftDisplay = 6; // Initialize output to show 60 BPM uint8_t rightDisplay = 0; void ioinit(); void display(int digit, int number); // Interrupt Timer 1 makes the buzzer tick at proper intervals ISR(TIMER1_COMPA_vect) { int buzzPeriod = 100; uint32_t buzzLength = 1000; while(1) { //Subtract the buzzPeriod from the overall length if(buzzPeriod > buzzLength) break; buzzLength -= buzzPeriod; if(buzzPeriod > buzzLength) break; buzzLength -= buzzPeriod; //Toggle the buzzer at various speeds PINB = 0b00000010; _delay_us(buzzPeriod); PINB = 0b00000100; _delay_us(buzzPeriod); } } // Interrupt Timer 2 checks for button presses ISR(TIMER0_COMPA_vect) { // Check down button if( (PINB & (1<<4)) == 0) { if (speed == 1) // If speed = 1 go up to 299 { speed = 299; rightDisplay = 9; leftDisplay = 9; } else if ((rightDisplay == 0) && (leftDisplay == 0)) { rightDisplay = 9; leftDisplay = 9; speed--; } else if (rightDisplay == 0) { rightDisplay = 9; leftDisplay--; speed--; } else { rightDisplay--; speed--; } // Reset counter and adjust compare register TCNT1 = 0x00; OCR1A = (countUp*60)/speed; } // Check up button if((PINB & (1<<5)) == 0) { if (speed == 299) { speed = 1; rightDisplay = 1; leftDisplay = 0; } else if ((rightDisplay == 9) && (leftDisplay == 9)) { rightDisplay = 0; leftDisplay = 0; speed++; } else if (rightDisplay == 9) { rightDisplay = 0; leftDisplay++; speed++; } else { rightDisplay++; speed++; } // Reset counter and adjust compare register TCNT1 = 0x00; OCR1A = (countUp*60)/speed; } } int main() { int flag = 0; ioinit(); while(1) // Main loop PWM's the two displays at 1kHz { if (flag == 0) { cbi(PORTC, 1); // Turn right display off display(0, leftDisplay); // Output to left display flag = 1; } else { cbi(PORTC, 0); // Turn left display off display(1, rightDisplay); // Output to right display flag = 0; } _delay_us(10); PORTD = 0xFF; cbi(PORTC, 0); cbi(PORTC, 1); _delay_us(30); } return 0; } void ioinit() { // set PORTB for Buzzer and buttons DDRB = DDRB | 0b00110110; PORTB = PORTB | 0b00110000; // set PORTC for DIGI select DDRC = 0b0000011; PINC = 0b0000011; // set PORTD for display DDRD = 0b11111111; // Set 16-bit Timer 1 for clicking TCCR1A = 0x00; TCCR1B = (_BV(WGM12) | _BV(CS12) | _BV(CS10)); // Divide clock by 1024, CTC mode OCR1A = (countUp*60)/speed; // Set top of counter TIMSK1 = _BV(OCIE1A); // Enable OCR1A interrupt // Set Timer 0 to check button press TCCR0A = _BV(WGM01); TCCR0B = _BV(CS00) | _BV(CS02); OCR0A = 100; // OCCR0A can be adjusted to change the button debounce time TIMSK0 = _BV(OCIE0A); sei(); // Enable interrupts } // This will output the corresponding // 'number' to digit 0 (left) or 1 (right) void display(int digit, int number) { //cbi(PORTC, digit); // Ties display to ground if (digit == 0) sbi(PORTC, 0); // Ties display to ground else if (digit == 1) sbi(PORTC, 1); switch(number) // Set PIND, display pins, to correct output { case 0: PORTD = 0b11000000; break; case 1: PORTD = 0b11111001; break; case 2: PORTD = 0b10100100; break; case 3: PORTD = 0b10110000; break; case 4: PORTD = 0b10011001; break; case 5: PORTD = 0b10010010; break; case 6: PORTD = 0b10000010; break; case 7: PORTD = 0b11111000; break; case 8: PORTD = 0b10000000; break; case 9: PORTD = 0b10010000; break; } // Turn decimal point on if above 100 & 200 if ((digit == 0) && (speed >= 200)) cbi(PORTD, 7); if ((digit == 1) && (speed >= 100)) cbi(PORTD, 7); }
——
People can contact us: https://www.donluc.com/?page_id=1927
Technology Experience
- Programming Language
- Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi,Espressif, etc…)
- IoT
- Wireless (Radio Frequency, Bluetooth, WiFi, Etc…)
- Robotics
- Camera and Video Capture Receiver Stationary, Wheel/Tank and Underwater Vehicle
- Unmanned Vehicles Terrestrial and Marine
- Machine Learning
- RTOS
- Research & Development (R & D)
Instructor, E-Mentor, STEAM, and Arts-Based Training
- Programming Language
- IoT
- PIC Microcontrollers
- Arduino
- Raspberry Pi
- Espressif
- Robotics
Follow Us
Luc Paquin – Curriculum Vitae – 2023
https://www.donluc.com/luc/
Web: https://www.donluc.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/@thesass2063
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/
Don Luc
Project #16: Sound – Bluetooth – Mk21
——
#DonLucElectronics #DonLuc #ESP32 #Bluetooth #ThumbJoystick #Keyboard #Arduino #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant
——
——
——
——
Bluetooth
Bluetooth is a short-range wireless technology standard that is used for exchanging data between fixed and mobile devices over short distances and building personal area networks. It employs UHF radio waves in the ISM bands, from 2.402 GHz to 2.48 GHz. It is mainly used as an alternative to wire connections, to exchange files between nearby portable devices, computer and connect cell phones and music players with wireless headphones. In the most widely used mode, transmission power is limited to 2.5 milliwatts, giving it a very short range of up to 10 metres.
DL2210Mk01
1 x Adafruit HUZZAH32 – ESP32 Feather
1 x Lithium Ion Battery – 2500mAh
1 x Thumb Joystick
1 x SparkFun Thumb Joystick Breakout
1 x SparkFun Cerberus USB Cable
ESP32 Feather
JY0 – Analog A0
JY1 – Analog A5
SE0 – Digital 13
VIN – +3.3V
GND – GND
——
DL2210Mk01p.ino
/* ***** Don Luc Electronics © ***** Software Version Information Project #16: Sound - Bluetooth - Mk21 16-21 DL2210Mk01p.ino 1 x Adafruit HUZZAH32 – ESP32 Feather 1 x Lithium Ion Battery - 2500mAh 1 x Thumb Joystick 1 x SparkFun Thumb Joystick Breakout 1 x SparkFun Cerberus USB Cable */ // Include the Library Code // ESP32 BLE Keyboard #include <BleKeyboard.h> // ESP32 BLE Keyboard BleKeyboard bleKeyboard; // Connections to joystick // Vertical const int VERT = A0; // Horizontal const int HORIZ = A5; // Pushbutton const int SEL = 13; // Initialize variables for analog and digital values int vertical; int horizontal; int selec; // Software Version Information String sver = "16-21"; void loop() { // ESP32 BLE Keyboard if(bleKeyboard.isConnected()) { // Thumb Joystick isThumbJoystick(); } // Delay delay( 1000 ); }
getThumbJoystick.ino
// Thumb Joystick void isThumbJoystick() { // Read all values from the joystick // Joystick was sitting around 2047 for the vertical and horizontal values // Will be 0-4095 // Vertical vertical = analogRead(VERT); if (vertical == 4095) { // Volume Up bleKeyboard.write(KEY_MEDIA_VOLUME_UP); } else if (vertical == 0) { // Volume Down bleKeyboard.write(KEY_MEDIA_VOLUME_DOWN); } // Horizontal // Will be 0-4095 horizontal = analogRead(HORIZ); if (horizontal == 4095) { // Previous Track bleKeyboard.write(KEY_MEDIA_PREVIOUS_TRACK); } else if (horizontal == 0) { // Next Track bleKeyboard.write(KEY_MEDIA_NEXT_TRACK); } // Will be HIGH (1) if not pressed, and LOW (0) if pressed selec = digitalRead(SEL); if (selec == 0) { // Play/Pause media key bleKeyboard.write(KEY_MEDIA_PLAY_PAUSE); } }
setup.ino
// Setup void setup() { // Make the SEL line an input pinMode(SEL, INPUT_PULLUP); // ESP32 BLE Keyboard bleKeyboard.begin(); }
——
People can contact us: https://www.donluc.com/?page_id=1927
Technology Experience
- Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi,Espressif, etc…)
- IoT
- Robotics
- Camera and Video Capture Receiver Stationary, Wheel/Tank and Underwater Vehicle
- Unmanned Vehicles Terrestrial and Marine
- Research & Development (R & D)
Instructor and E-Mentor
- IoT
- PIC Microcontrollers
- Arduino
- Raspberry Pi
- Espressif
- Robotics
Follow Us
J. Luc Paquin – Curriculum Vitae – 2022 English & Español
https://www.jlpconsultants.com/luc/
Web: https://www.donluc.com/
Web: https://www.jlpconsultants.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/channel/UC5eRjrGn1CqkkGfZy0jxEdA
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/
Don Luc
Project #16: Sound – Dayton Audio RS75T-8 – Mk20
——
#DonLucElectronics #DonLuc #Sound #Arduino #ESP32 #SparkFunThingPlusESP32WROOM #SparkFunQwiicMP3 #DaytonAudioRS75T #Project #Programming #Electronics #Microcontrollers #Consultant #VideoBlog
——
——
——
——
——
Dayton Audio RS75T-8 3″ Reference Full-Range Driver Truncated Frame
The Dayton Audio Reference Series sets a new standard of value in high-performance loudspeaker drivers. Incorporating a low-distortion motor system with a copper ring, a copper cap, and an aluminum phase plug, the RS75T-8 can outperform “boutique” drivers that cost several times the price. The driver’s truncated frame makes it ideal for line arrays and ultra-compact MTM designs requiring minimal driver-to-driver spacing. Its low-distortion characteristics and smooth response provide exceptional clarity, detail, and dynamics. Features a black anodized cone, heavy-duty 4-hole cast frame, low-loss rubber surround, and gold terminals.
DL2107Mk02
1 x SparkFun Thing Plus – ESP32 WROOM
1 x SparkFun Qwiic MP3 Trigger
1 x microSD Card – 2GB
1 x Panel Mount 10K potentiometer
1 x Knob
1 x Slide Switch
2 x Rocker Switch – SPST (Round)
1 x Qwiic Cable – 50mm
1 x Dayton Audio Reference 3″ Full-Range Drive
1 x Lithium Ion Battery – 850mAh
1 x JST Jumper 2 Wire Assembly
2 x Screw Terminals 5mm Pitch (2-Pin)
1 x Acrylic Blue 5.75in x 3.75in x 1/8in
1 x Acrylic Purple 5.75in x 3.75in x 1/8in
24 x Screw – 4-40
4 x Nut – Nylon Locknut 4-40
6 x Standoff – Metal 4-40 – 3/8″
8 x Standoff – Metal 4-40 – 1″
18 x Wire Solid Core – 22 AWG
1 x Adafruit Perma-Prote Half-Size Breadboard
1 x SparkFun Cerberus USB Cable
SparkFun Thing Plus – ESP32 WROOM
PO1 – Analog A0
SW0 – Digital 21
SW1 – Digital 17
VIN – +3.3V
GND – GND
DL2107Mk02p.ino
/* ***** Don Luc Electronics © ***** Software Version Information #16 - Sound - Dayton Audio RS75T-8 - Mk20 07-02 DL2107Mk02p.ino 1 x SparkFun Thing Plus - ESP32 WROOM 1 x SparkFun Qwiic MP3 Trigger 1 x microSD Card - 2GB 1 x Panel Mount 10K potentiometer 1 x Knob 1 x Slide Switch 2 x Rocker Switch - SPST (Round) 1 x Qwiic Cable - 50mm 1 x Dayton Audio Reference 3" Full-Range Drive 1 x Lithium Ion Battery - 850mAh 1 x JST Jumper 2 Wire Assembly 2 x Screw Terminals 5mm Pitch (2-Pin) 1 x Acrylic Blue 5.75in x 3.75in x 1/8in 1 x Acrylic Purple 5.75in x 3.75in x 1/8in 24 x Screw - 4-40 4 x Nut - Nylon Locknut 4-40 6 x Standoff - Metal 4-40 - 3/8" 8 x Standoff - Metal 4-40 - 1" 18 x Wire Solid Core - 22 AWG 1 x Adafruit Perma-Prote Half-Size Breadboard 1 x SparkFun Cerberus USB Cable */ // Include the Library Code // Wire communicate with I2C / TWI devices #include <Wire.h> // SparkFun MP3 Trigger #include "SparkFun_Qwiic_MP3_Trigger_Arduino_Library.h" // SparkFun MP3 Trigger MP3TRIGGER mp3; int iSongCount = 0; int x = 0; // Volume int iVolume = A0; int iVolumeLevel = 0; // EQ Setting Normal byte bEQSetting = 0; // Play Next const int iPlayNext = 21; // Variable for reading the iPlayNext status int iPlayNextState = 0; // Play Previous const int iPlayPrevious = 17; // Variable for reading the iPlayPrevious status int iPlayPreviousState = 0; // Software Version Information String sver = "16-20"; void loop() { if (mp3.isPlaying() == false) { if ( x > iSongCount ) { x = 0; } else { x = x + 1; } // Play Track mp3.playTrack( x ); } else { // Volume isVolume(); // Play Next isPlayNext(); // Play Previous isPlayPrevious(); } }
getMP3.ino
// MP3 // Setup MP3 void isSetupMP3(){ // Check to see if Qwiic MP3 is present on the bus if (mp3.begin() == false) { // Qwiic MP3 failed to respond. Please check wiring and possibly the I2C address. Freezing... while (1); } if (mp3.hasCard() == false) { // Qwiic MP3 is missing its SD card. Freezing... while (1); } // Song Count iSongCount = mp3.getSongCount(); // EQ Setting Classic bEQSetting = mp3.getEQ(); // Initialize the iPlayNext pinMode( iPlayNext, INPUT); // Initialize the iPlayPrevious pinMode( iPlayPrevious, INPUT); } // Volume void isVolume() { // Volume iVolumeLevel = analogRead( iVolume ); // (0-1023 for 10 bits or 0-4095 for 12 bits) iVolumeLevel = map(iVolumeLevel, 0, 4095, 0, 31); // Volume can be 0 (off) to 31 (max) mp3.setVolume( iVolumeLevel ); } // Play Next void isPlayNext() { // Read the state of the iPlayNext value iPlayNextState = digitalRead( iPlayNext ); if ( iPlayNextState == HIGH ) { mp3.stop(); if ( x > iSongCount ) { x = 0; } else { x = x + 1; } // Play Track mp3.playTrack( x ); } } // Play Previous void isPlayPrevious() { // Read the state of the iPlayPrevious value iPlayPreviousState = digitalRead( iPlayPrevious ); if ( iPlayPreviousState == HIGH ) { mp3.stop(); if ( x > iSongCount ) { x = 0; } else { x = x - 1; } // Play Track mp3.playTrack( x ); } }
setup.ino
// Setup void setup() { // Wire communicate with I2C / TWI devices Wire.begin(); // SparkFun MP3 Trigger Setup isSetupMP3(); }
——
People can contact us: https://www.donluc.com/?page_id=1927
Technology Experience
- Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi,Espressif, etc…)
- Robotics
- Research & Development (R & D)
- Desktop Applications (Windows, OSX, Linux, Multi-OS, Multi-Tier, etc…)
- Mobile Applications (Android, iOS, Blackberry, Windows Mobile, Windows CE, etc…)
- Web Applications (LAMP, Scripting, Java, ASP, ASP.NET, RoR, Wakanda, etc…)
- Social Media Programming & Integration (Facebook, Twitter, YouTube, Pinterest, etc…)
- Content Management Systems (WordPress, Drupal, Joomla, Moodle, etc…)
- Bulletin Boards (phpBB, SMF, Vanilla, jobberBase, etc…)
- eCommerce (WooCommerce, OSCommerce, ZenCart, PayPal Shopping Cart, etc…)
Instructor
- PIC Microcontrollers
- Arduino
- Raspberry Pi
- Espressif
- Robotics
- DOS, Windows, OSX, Linux, iOS, Android, Multi-OS
- Linux-Apache-PHP-MySQL
Follow Us
J. Luc Paquin – Curriculum Vitae – 2021 English & Español
https://www.jlpconsultants.com/CV/LucPaquinCVEngMk2021c.pdf
https://www.jlpconsultants.com/CV/LucPaquinCVEspMk2021c.pdf
Web: https://www.donluc.com/
Web: http://www.jlpconsultants.com/
Web: https://www.donluc.com/DLE/
Web: https://www.donluc.com/DLHackster/
Web: https://www.hackster.io/neosteam-labs
Web: https://zoom.us/
Patreon: https://www.patreon.com/DonLucElectronics
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/channel/UC5eRjrGn1CqkkGfZy0jxEdA
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/
Don Luc
Project #16: Sound – SparkFun Thing Plus ESP32 WROOM – Mk19
——
#DonLucElectronics #DonLuc #Sound #Arduino #ESP32 #SparkFunThingPlusESP32WROOM #SparkFunQwiicMP3 #Project #Programming #Electronics #Microcontrollers #Consultant #VideoBlog
——
——
——
——
——-
SparkFun Thing Plus – ESP32 WROOM
The SparkFun ESP32 Thing Plus is the next step to get started with Espressif IoT ideations while still enjoying all the amenities of the original ESP32 Thing. Espressif’s ESP32 WROOM is a powerful WiFi and Bluetooth MCU module that targets a wide variety of applications. At the core of this module is the ESP32-D0WDQ6 chip which is designed to be both scalable and adaptive. To make the Thing Plus even easier to use, we’ve moved a few pins around to make the board Feather compatible and it utilizes our handy Qwiic Connect System which means no soldering or shields are required to connect it to the rest of your system. A JST connector to plug in a LiPo battery.
SparkFun Qwiic MP3 Trigger
Sometimes you just need an MP3 to play. The SparkFun Qwiic MP3 Trigger takes care of all the necessary requirements, all you need to do is send a simple I2C command and listen to whatever is on your micro SD card. The contents of the microSD card appears as a jump drive. Simply plug in the Qwiic MP3 Trigger and you’ll be transferring MP3s, no need for drivers and no need for WAV or Vorbis conversion. Your supplied speaker is boosted by a Class-D mono amplifier capable of outputting up to 1.4W making it capable of being incredibly loud. Volume is software selectable between 32 levels.
DL2107Mk01
1 x SparkFun Thing Plus – ESP32 WROOM
1 x SparkFun Qwiic MP3 Trigger
1 x microSD Card – 2GB
1 x Panel Mount 1K potentiometer
1 x Knob
1 x Qwiic Cable – 100mm
1 x Dayton Audio Reference 3″ Full-Range Drive
2 x Wire Stranded Core – 18 AWG
7 x Wire Solid Core – 22 AWG
1 x Full-Size Breadboard
1 x SparkFun Cerberus USB Cable
SparkFun Thing Plus – ESP32 WROOM
PO1 – Analog A0
SW0 – Digital 21
SW1 – Digital 17
VIN – +3.3V
GND – GND
DL2107Mk01p.ino
// ***** Don Luc Electronics © ***** // Software Version Information // #16 - Sound - SparkFun Thing Plus ESP32 WROOM - Mk19 // 07-01 // DL2107Mk01p.ino // 1 x SparkFun RedBoard Qwiic // 1 x SparkFun Qwiic MP3 Trigger // 1 x microSD Card - 2GB // 1 x Panel Mount 1K potentiometer // 1 x Knob // 1 x Qwiic Cable - 100mm // 1 x Dayton Audio Reference 3" Full-Range Drive // 2 x Wire Stranded Core - 18 AWG // 7 x Wire Solid Core - 22 AWG // 1 x Full-Size Breadboard // 1 x SparkFun Cerberus USB Cable // Include the Library Code // Wire communicate with I2C / TWI devices #include <Wire.h> // SparkFun MP3 Trigger #include "SparkFun_Qwiic_MP3_Trigger_Arduino_Library.h" // SparkFun MP3 Trigger MP3TRIGGER mp3; int iSongCount = 0; int x = 0; // Volume int iVolume = A0; int iVolumeLevel = 0; // EQ Setting Normal byte bEQSetting = 0; // Play Next const int iPlayNext = 21; // Variable for reading the iPlayNext status int iPlayNextState = 0; // Play Previous const int iPlayPrevious = 17; // Variable for reading the iPlayPrevious status int iPlayPreviousState = 0; // Software Version Information String sver = "16-19"; void loop() { if (mp3.isPlaying() == false) { if ( x > iSongCount ) { x = 0; } else { x = x + 1; } // Play Track mp3.playTrack( x ); } else { // Volume isVolume(); // Play Next isPlayNext(); // Play Previous isPlayPrevious(); } }
getMP3.ino
// MP3 // Setup MP3 void isSetupMP3(){ // Check to see if Qwiic MP3 is present on the bus if (mp3.begin() == false) { // Qwiic MP3 failed to respond. Please check wiring and possibly the I2C address. Freezing... while (1); } if (mp3.hasCard() == false) { // Qwiic MP3 is missing its SD card. Freezing... while (1); } // Song Count iSongCount = mp3.getSongCount(); // EQ Setting Classic bEQSetting = mp3.getEQ(); // Initialize the iPlayNext pinMode( iPlayNext, INPUT); // Initialize the iPlayPrevious pinMode( iPlayPrevious, INPUT); } // Volume void isVolume() { // Volume iVolumeLevel = analogRead( iVolume ); // (0-1023 for 10 bits or 0-4095 for 12 bits) iVolumeLevel = map(iVolumeLevel, 0, 4095, 0, 31); // Volume can be 0 (off) to 31 (max) mp3.setVolume( iVolumeLevel ); } // Play Next void isPlayNext() { // Read the state of the iPlayNext value iPlayNextState = digitalRead( iPlayNext ); if ( iPlayNextState == HIGH ) { mp3.stop(); if ( x > iSongCount ) { x = 0; } else { x = x + 1; } // Play Track mp3.playTrack( x ); } } // Play Previous void isPlayPrevious() { // Read the state of the iPlayPrevious value iPlayPreviousState = digitalRead( iPlayPrevious ); if ( iPlayPreviousState == HIGH ) { mp3.stop(); if ( x > iSongCount ) { x = 0; } else { x = x - 1; } // Play Track mp3.playTrack( x ); } }
setup.ino
// Setup void setup() { // Wire communicate with I2C / TWI devices Wire.begin(); // SparkFun MP3 Trigger Setup isSetupMP3(); }
——
People can contact us: https://www.donluc.com/?page_id=1927
Technology Experience
- Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi,Espressif, etc…)
- Robotics
- Research & Development (R & D)
- Desktop Applications (Windows, OSX, Linux, Multi-OS, Multi-Tier, etc…)
- Mobile Applications (Android, iOS, Blackberry, Windows Mobile, Windows CE, etc…)
- Web Applications (LAMP, Scripting, Java, ASP, ASP.NET, RoR, Wakanda, etc…)
- Social Media Programming & Integration (Facebook, Twitter, YouTube, Pinterest, etc…)
- Content Management Systems (WordPress, Drupal, Joomla, Moodle, etc…)
- Bulletin Boards (phpBB, SMF, Vanilla, jobberBase, etc…)
- eCommerce (WooCommerce, OSCommerce, ZenCart, PayPal Shopping Cart, etc…)
Instructor
- PIC Microcontrollers
- Arduino
- Raspberry Pi
- Espressif
- Robotics
- DOS, Windows, OSX, Linux, iOS, Android, Multi-OS
- Linux-Apache-PHP-MySQL
Follow Us
J. Luc Paquin – Curriculum Vitae – 2021 English & Español
https://www.jlpconsultants.com/CV/LucPaquinCVEngMk2021c.pdf
https://www.jlpconsultants.com/CV/LucPaquinCVEspMk2021c.pdf
Web: https://www.donluc.com/
Web: http://www.jlpconsultants.com/
Web: https://www.donluc.com/DLE/
Web: https://www.donluc.com/DLHackster/
Web: https://www.hackster.io/neosteam-labs
Web: https://zoom.us/
Patreon: https://www.patreon.com/DonLucElectronics
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/channel/UC5eRjrGn1CqkkGfZy0jxEdA
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/
Don Luc
Project #16: Sound – Music Acoustics – Mk18
——
#DonLucElectronics #DonLuc #Sound #WhiteNoise #Mozzi #WavePacket #Arduino #Project #Programming #Electronics #Microcontrollers #Consultant #VideoBlog
——
——
——
——
——
Music Acoustics
Music acoustics is a multidisciplinary field that combines knowledge from physics, psychophysics, physiology, and signal processing among other disciplines. As a branch of acoustics, it is concerned with researching and describing the physics of music, how sounds are employed to make music. Examples of areas of study are the function human voice (the physics of speech), computer analysis, and in the clinical.
DL2106Mk05
1 x Arduino Pro Mini 328 – 5V/16MHz
2 x Mountable Slide Switch
1 x 10K Ohm
2 x LED Green
2 x 270 Ohm
3 x Rotary Potentiometer – 10k Ohm
3 x Knob
1 x Audio Jack 3.5mm
1 x SparkFun Audio Jack Breakout
2 x Battery Holder – 2 x AAA
4 x Alkaline Battery – AAA
1 x JST Jumper 2 Wire Assembly
19 x Wire Solid Core – 22 AWG
8 x Screw, 1/4 inches, 4-40
8 x Nut, Nylon Locknut, 4-40
3 x Standoff, Metal 4-40, 3/8 inches
1 x Adafruit Perma-Proto Quarter-sized Breadboard PCB
1 x Bakelite Perfboard
1 x Hamburger Mini Speaker
1 x ABS Plastic Multi-Purpose Enclosures
1 x SparkFun Cerberus USB Cable
1 x SparkFun FTDI Basic Breakout – 5V
Arduino Pro Mini 328 – 5V/16MHz
PO1 – Analog A0
PO2 – Analog A1
PO3 – Analog A2
SPK – Digital 9
LD1 – Digital 6
LD2 – Digital 7
SW1 – Digital 4
VIN – +5V
GND – GND
DL2106Mk05p.ino
// ***** Don Luc Electronics © ***** // Software Version Information // Project #16: Sound - Music Acoustics - Mk18 // 06-05 // DL2106Mk05.ino 16-18 // 1 x Arduino Pro Mini 328 - 5V/16MHz // 2 x Mountable Slide Switch // 1 x 10K Ohm // 2 x LED Green // 2 x 270 Ohm // 3 x Rotary Potentiometer - 10k Ohm // 3 x Knob // 1 x Audio Jack 3.5mm // 1 x SparkFun Audio Jack Breakout // 2 x Battery Holder - 2 x AAA // 4 x Alkaline Battery - AAA // 1 x JST Jumper 2 Wire Assembly // 19 x Wire Solid Core - 22 AWG // 8 x Screw, 1/4 inches, 4-40 // 8 x Nut, Nylon Locknut, 4-40 // 3 x Standoff, Metal 4-40, 3/8 inches // 1 x Adafruit Perma-Proto Quarter-sized Breadboard PCB // 1 x Bakelite Perfboard // 1 x Hamburger Mini Speaker // 1 x ABS Plastic Multi-Purpose Enclosures // 1 x SparkFun Cerberus USB Cable // 1 x SparkFun FTDI Basic Breakout - 5V // Include the Library Code // Mozzi #include <MozziGuts.h> // Mozzi Random #include <mozzi_rand.h> // Oscillator template #include <Oscil.h> // Mozzi Analog #include <mozzi_analog.h> // WavePacket Sample #include <WavePacket.h> // Rolling Average #include <RollingAverage.h> // Sine table for oscillator whitenoise #include <tables/whitenoise8192_int8.h> // Set the input for the knob #define FUNDAMENTAL_PIN A0 #define BANDWIDTH_PIN A1 #define CENTREFREQ_PIN A2 // for smoothing the control signals // Rolling Average RollingAverage <int, 32> kAverageF; RollingAverage <int, 32> kAverageBw; RollingAverage <int, 32> kAverageCf; // SINGLE selects 1 non-overlapping stream WavePacket <SINGLE> wavey; // Oscil <table_size, update_rate> oscilName (wavetable) Oscil <WHITENOISE8192_NUM_CELLS, AUDIO_RATE> aSin(WHITENOISE8192_DATA); // Mini Speaker int SPK = 9; // Mountable Slide Switch int iSS1 = 4; // State int iSS1State = 0; // LED Green int iLEDG1 = 6; int iLEDG2 = 7; // Set the input for the volume // Volume level from updateControl() to updateAudio() byte vol; // Software Version Information String sver = "16-18"; void loop() { // Slide Switch // Read the state of the iSS1 value iSS1State = digitalRead(iSS1); // Audio Hook audioHook(); }
getMozzi.ino
// Mozzi // Update Control void updateControl(){ // If it is the Slide Switch State is HIGH if (iSS1State == HIGH) { // White Noise vol = 255; } else { // Wavey Set wavey.set(kAverageF.next(mozziAnalogRead(FUNDAMENTAL_PIN))+1, kAverageBw.next(mozziAnalogRead(BANDWIDTH_PIN)), kAverageCf.next(2*mozziAnalogRead(CENTREFREQ_PIN))); } } // Update Audio int updateAudio() { // If it is the Slide Switch State is HIGH if (iSS1State == HIGH) { // LED Green digitalWrite(iLEDG1, HIGH); digitalWrite(iLEDG2, LOW); // White Noise char whitenoise = rand((byte)255) - 128; return (((whitenoise * aSin.next())) * vol)>>8; } else { // LED Green digitalWrite(iLEDG1, LOW); digitalWrite(iLEDG2, HIGH); // AUDIO_MODE STANDARD // Wavey Next return wavey.next()>>8; } }
setup.ino
// Setup void setup() { // Slide Switch pinMode(iSS1, INPUT); // LED Green pinMode(iLEDG1, OUTPUT); pinMode(iLEDG2, OUTPUT); // Mozzi Start startMozzi(); // Set the frequency aSin.setFreq(0.05f); }
People can contact us: https://www.donluc.com/?page_id=1927
Technology Experience
- Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi,Espressif, etc…)
- Robotics
- Research & Development (R & D)
- Desktop Applications (Windows, OSX, Linux, Multi-OS, Multi-Tier, etc…)
- Mobile Applications (Android, iOS, Blackberry, Windows Mobile, Windows CE, etc…)
- Web Applications (LAMP, Scripting, Java, ASP, ASP.NET, RoR, Wakanda, etc…)
- Social Media Programming & Integration (Facebook, Twitter, YouTube, Pinterest, etc…)
- Content Management Systems (WordPress, Drupal, Joomla, Moodle, etc…)
- Bulletin Boards (phpBB, SMF, Vanilla, jobberBase, etc…)
- eCommerce (WooCommerce, OSCommerce, ZenCart, PayPal Shopping Cart, etc…)
Instructor
- PIC Microcontrollers
- Arduino
- Raspberry Pi
- Espressif
- Robotics
- DOS, Windows, OSX, Linux, iOS, Android, Multi-OS
- Linux-Apache-PHP-MySQL
Follow Us
J. Luc Paquin – Curriculum Vitae – 2021 English & Español
https://www.jlpconsultants.com/CV/LucPaquinCVEngMk2021c.pdf
https://www.jlpconsultants.com/CV/LucPaquinCVEspMk2021c.pdf
Web: https://www.donluc.com/
Web: http://www.jlpconsultants.com/
Web: https://www.donluc.com/DLE/
Web: https://www.donluc.com/DLHackster/
Web: https://www.hackster.io/neosteam-labs
Web: https://zoom.us/
Patreon: https://www.patreon.com/DonLucElectronics
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/channel/UC5eRjrGn1CqkkGfZy0jxEdA
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/
Don Luc
Project #16: Sound – White Noise or Wave Packet – Mk17
——
#donluc #sound #whitenoise #mozzi #WavePacket #arduino #sparkfun #project #programming #electronics #microcontrollers #consultant #zoom #patreon #videoblog
——
——
——
——
White Noise
White Noise can be used by all audiences in a variety of ways throughout our daily lives. Whether you’re trying to work, study, relax, or even sleep. Offices can be either too quiet or too noisy. White noise makes it impossible to concentrate. Sound affects many areas of the brain and has an undeniable effect on the body. A good way to test if a particular sound is relaxing to you is to check your pulse, if it slows down, then you have found the sound that is calming you. Keep listening to it and you will relax, reaching a state of increased calmness and reducing your levels of anxiety, stress, or anger.
Wave Packet
In physics, a wave packet is a short burst of localized wave action that travels as a unit. A wave packet can be analyzed into, or can be synthesized from, an infinite set of component sinusoidal waves of different wavenumbers, with phases and amplitudes such that they interfere constructively only over a small region of space, and destructively elsewhere.Each component wave function, and hence the wave packet, are solutions of a wave equation. Depending on the wave equation, the wave packet’s profile may remain constant or it may change while propagating.
DL2104Mk02
1 x Arduino Pro Mini 328 – 5V/16MHz
1 x Mountable Slide Switch
1 x 10K Ohm
2 x LED Green
2 x 270 Ohm
3 x Rotary Potentiometer – 10k Ohm
3 x Knob
1 x Audio Jack 3.5mm
1 x SparkFun Audio Jack Breakout
1 x Hamburger Mini Speaker
12 x Wire Solid Core – 22 AWG
7 x Jumper Wires 3 inches M/M
2 x Jumper Wires 6 inches M/M
1 x Full-Size Breadboard
1 x SparkFun Cerberus USB Cable
1 x SparkFun FTDI Basic Breakout – 5V
Arduino Pro Mini 328 – 5V/16MHz
PO1 – Analog A0
PO2 – Analog A1
PO3 – Analog A2
SPK – Digital 9
LD1 – Digital 6
LD2 – Digital 7
SW1 – Digital 4
VIN – +5V
GND – GND
DL2104Mk02p.ino
// ***** Don Luc Electronics © ***** // Software Version Information // Project #16: Sound - White Noise - Mk17 // 04-02 // DL2104Mk02p.ino 16-17 // 1 x Arduino Pro Mini 328 - 5V/16MHz // 1 x Mountable Slide Switch // 1 x 10K Ohm // 2 x LED Green // 2 x 270 Ohm // 3 x Rotary Potentiometer - 10k Ohm // 3 x Knob // 1 x Audio Jack 3.5mm // 1 x SparkFun Audio Jack Breakout // 1 x Hamburger Mini Speaker // 12 x Wire Solid Core - 22 AWG // 7 x Jumper Wires 3 inches M/M // 2 x Jumper Wires 6 inches M/M // 1 x Full-Size Breadboard // 1 x SparkFun Cerberus USB Cable // 1 x SparkFun FTDI Basic Breakout - 5V // Include the Library Code // Mozzi #include <MozziGuts.h> // Mozzi Random #include <mozzi_rand.h> // Oscillator template #include <Oscil.h> // Mozzi Analog #include <mozzi_analog.h> // WavePacket Sample //#include <WavePacketSample.h> #include <WavePacket.h> // Rolling Average #include <RollingAverage.h> // Sine table for oscillator whitenoise #include <tables/whitenoise8192_int8.h> // Set the input for the knob #define FUNDAMENTAL_PIN A0 #define BANDWIDTH_PIN A1 #define CENTREFREQ_PIN A2 // for smoothing the control signals // Rolling Average RollingAverage <int, 32> kAverageF; RollingAverage <int, 32> kAverageBw; RollingAverage <int, 32> kAverageCf; // SINGLE selects 1 non-overlapping stream WavePacket <SINGLE> wavey; // Oscil <table_size, update_rate> oscilName (wavetable) Oscil <WHITENOISE8192_NUM_CELLS, AUDIO_RATE> aSin(WHITENOISE8192_DATA); // Mini Speaker int SPK = 9; // Mountable Slide Switch int iSS1 = 4; // State int iSS1State = 0; // LED Green int iLEDG1 = 6; int iLEDG2 = 7; // Set the input for the volume // Volume level from updateControl() to updateAudio() byte vol; // Software Version Information String sver = "16-17"; void loop() { // Slide Switch // Read the state of the iSS1 value iSS1State = digitalRead(iSS1); // Audio Hook audioHook(); }
getMozzi.ino
// Mozzi // Update Control void updateControl(){ // If it is the Slide Switch State is HIGH if (iSS1State == HIGH) { // White Noise vol = 255; } else { // Wavey Set wavey.set(kAverageF.next(mozziAnalogRead(FUNDAMENTAL_PIN))+1, kAverageBw.next(mozziAnalogRead(BANDWIDTH_PIN)), kAverageCf.next(2*mozziAnalogRead(CENTREFREQ_PIN))); } } // Update Audio int updateAudio() { // If it is the Slide Switch State is HIGH if (iSS1State == HIGH) { // LED Green digitalWrite(iLEDG1, HIGH); digitalWrite(iLEDG2, LOW); // White Noise char whitenoise = rand((byte)255) - 128; return (((whitenoise * aSin.next())) * vol)>>8; } else { // LED Green digitalWrite(iLEDG1, LOW); digitalWrite(iLEDG2, HIGH); // AUDIO_MODE STANDARD // Wavey Next return wavey.next()>>8; } }
setup.ino
// Setup void setup() { // Slide Switch pinMode(iSS1, INPUT); // LED Green pinMode(iLEDG1, OUTPUT); pinMode(iLEDG2, OUTPUT); // Mozzi Start startMozzi(); // Set the frequency aSin.setFreq(0.05f); }
People can contact us: https://www.donluc.com/?page_id=1927
Technology Experience
- Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi,Espressif, etc…)
- Robotics
- Research & Development (R & D)
- Desktop Applications (Windows, OSX, Linux, Multi-OS, Multi-Tier, etc…)
- Mobile Applications (Android, iOS, Blackberry, Windows Mobile, Windows CE, etc…)
- Web Applications (LAMP, Scripting, Java, ASP, ASP.NET, RoR, Wakanda, etc…)
- Social Media Programming & Integration (Facebook, Twitter, YouTube, Pinterest, etc…)
- Content Management Systems (WordPress, Drupal, Joomla, Moodle, etc…)
- Bulletin Boards (phpBB, SMF, Vanilla, jobberBase, etc…)
- eCommerce (WooCommerce, OSCommerce, ZenCart, PayPal Shopping Cart, etc…)
Instructor
- PIC Microcontrollers
- Arduino
- Raspberry Pi
- Espressif
- Robotics
- DOS, Windows, OSX, Linux, iOS, Android, Multi-OS
- Linux-Apache-PHP-MySQL
Follow Us
J. Luc Paquin – Curriculum Vitae
https://www.donluc.com/DLE/LucPaquinCVEngMk2021a.pdf
Web: https://www.donluc.com/
Web: http://www.jlpconsultants.com/
Web: https://www.donluc.com/DLE/
Web: https://www.donluc.com/DLHackster/
Web: https://www.hackster.io/neosteam-labs
Web: https://zoom.us/
Patreon: https://www.patreon.com/DonLucElectronics
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/channel/UC5eRjrGn1CqkkGfZy0jxEdA
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/
Don Luc
Project #16: Sound – White Noise – Mk16
——
#donluc #sound #whitenoise #mozzi #arduino #sparkfun #project #programming #electronics #microcontrollers #consultant #zoom #patreon #videoblog
——
——
——
——
White Noise
Thus, random signals are considered “white noise” if they are observed to have a flat spectrum over the range of frequencies that are relevant to the context. For an audio signal, the relevant range is the band of audible sound frequencies (between 20 and 20,000 Hz). Such a signal is heard by the human ear as a hissing sound. In music and acoustics, the term “white noise” may be used for any signal that has a similar hissing sound. It is sometimes used analogously in nontechnical contexts to mean “random talk without meaningful contents”.
DL2104Mk01
1 x Arduino Pro Mini 328 – 5V/16MHz
1 x Audio Jack 3.5mm
1 x SparkFun Audio Jack Breakout
1 x Hamburger Mini Speaker
4 x Jumper Wires 3in M/M
1 x Full-Size Breadboard
1 x SparkFun Cerberus USB Cable
1 x SparkFun FTDI Basic Breakout – 5V
Arduino Pro Mini 328 – 5V/16MHz
SPK – Digital 9
VIN – +5V
GND – GND
DL2104Mk01p.ino
// ***** Don Luc Electronics © ***** // Software Version Information // Project #16: Sound - White Noise - Mk16 // 04-01 // DL2104Mk01p.ino 16-16 // 1 x Arduino Pro Mini 328 - 5V/16MHz // 1 x Audio Jack 3.5mm // 1 x SparkFun Audio Jack Breakout // 1 x Hamburger Mini Speaker // 4 x Jumper Wires 3in M/M // 1 x Full-Size Breadboard // 1 x SparkFun Cerberus USB Cable // 1 x SparkFun FTDI Basic Breakout - 5V // Include the Library Code // Mozzi #include <MozziGuts.h> #include <mozzi_rand.h> // Oscillator template #include <Oscil.h> // Sine table for oscillator whitenoise #include <tables/whitenoise8192_int8.h> // Oscil <table_size, update_rate> oscilName (wavetable), look in .h file of table #included above Oscil <WHITENOISE8192_NUM_CELLS, AUDIO_RATE> aSin(WHITENOISE8192_DATA); // Mini Speaker int SPK = 9; // Set the input for the volume // To convey the volume level from updateControl() to updateAudio() byte volume; // Software Version Information String sver = "16-16"; void loop() { // Audio Hook audioHook(); }
getMozzi.ino
// Mozzi // Update Control int updateAudio() { // White Noise char whitenoise = rand((byte)255) - 128; return ((whitenoise * aSin.next()) * volume)>>8; } // Update Audio void updateControl(){ // Map it to an 8 bit range for efficient calculations in updateAudio // Volume volume = 255; }
setup.ino
// Setup void setup() { // Mozzi Start startMozzi(); // Set the frequency aSin.setFreq(0.05f); }
People can contact us: https://www.donluc.com/?page_id=1927
Technology Experience
- Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi,Espressif, etc…)
- Robotics
- Research & Development (R & D)
- Desktop Applications (Windows, OSX, Linux, Multi-OS, Multi-Tier, etc…)
- Mobile Applications (Android, iOS, Blackberry, Windows Mobile, Windows CE, etc…)
- Web Applications (LAMP, Scripting, Java, ASP, ASP.NET, RoR, Wakanda, etc…)
- Social Media Programming & Integration (Facebook, Twitter, YouTube, Pinterest, etc…)
- Content Management Systems (WordPress, Drupal, Joomla, Moodle, etc…)
- Bulletin Boards (phpBB, SMF, Vanilla, jobberBase, etc…)
- eCommerce (WooCommerce, OSCommerce, ZenCart, PayPal Shopping Cart, etc…)
Instructor
- PIC Microcontrollers
- Arduino
- Raspberry Pi
- Espressif
- Robotics
- DOS, Windows, OSX, Linux, iOS, Android, Multi-OS
- Linux-Apache-PHP-MySQL
Follow Us
J. Luc Paquin – Curriculum Vitae
https://www.donluc.com/DLE/LucPaquinCVEngMk2021a.pdf
Web: https://www.donluc.com/
Web: http://www.jlpconsultants.com/
Web: https://www.donluc.com/DLE/
Web: https://www.donluc.com/DLHackster/
Web: https://www.hackster.io/neosteam-labs
Web: https://zoom.us/
Patreon: https://www.patreon.com/DonLucElectronics
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/channel/UC5eRjrGn1CqkkGfZy0jxEdA
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/
Don Luc
Project #16: Sound – Microphone SparkFun Sound Detector – Mk15
——
#donluc #microphone #sound #arduino #fritzing #sparkfun #project #programming #software #electronics #microcontrollers #consultant #vlog
——
——
——
——
——
Microphone
A microphone is a device a transducer that converts sound into an electrical signal. Microphones are used in many applications. They are also used in computers for recording voice, speech recognition, VoIP, and for non-acoustic purposes such as ultrasonic sensors or knock sensors.
Electret microphone is a type of electrostatic capacitor-based microphone, which eliminates the need for a polarizing power supply by using a permanently charged material. Unlike other condenser microphones, electret types require no polarizing voltage, but they normally contain an integrated preamplifier, which does require a small amount of power.
SparkFun Sound Detector
SparkFun Item: SEN-12642
The SparkFun Sound Detector is a small and very easy to use audio sensing board with three different outputs. The Sound Detector not only provides an audio output, but also a binary indication of the presence of sound, and an analog representation of its amplitude. The 3 outputs are simultaneous and independent, so you can use as many or as few as you want at once.
The envelope output allows you to easily read amplitude of sound by simply measuring the analog voltage. Gain can be adjusted with a through-hole resistor, to change the threshold of the binary output pin as well.
DL2101Mk03
1 x SparkFun RedBoard Qwiic
1 x SparkFun Sound Detector
3 x Jumper Wires 6in M/M
1 x Half-Size Breadboard
1 x SparkFun Cerberus USB Cable
SparkFun RedBoard Qwiic
MIC – Analog A0
VIN – +5V
GND – GND
DL2101Mk03p.ino
// ***** Don Luc Electronics © ***** // Software Version Information // Project #16: Sound - SparkFun Sound Detector - Mk15 // 01-03 // DL2101Mk03p.ino 16-15 // DL2101Mk03 // 1 x SparkFun RedBoard Qwiic // 1 x SparkFun Sound Detector // 3 x Jumper Wires 6in M/M // 1 x Half-Size Breadboard // 1 x SparkFun Cerberus USB Cable // Include the Library Code // Microphone unsigned int iMic = A0; // Sample window width in mS const int sampleWindow = 250; // Volume unsigned int iVol; // Peak-to-peak level unsigned int peakToPeak = 0; // Max - Min unsigned int signalMax = 0; unsigned int signalMin = 1024; // Convert to volts double volts = 0; // Software Version Information String sver = "16-15"; void loop() { // Microphone isMic(); }
getMic.ino
// getMic // is Microphone void isMic() { // Start of sample window unsigned long start = millis(); // Peak-to-peak level peakToPeak = 0; // Max - Min signalMax = 0; signalMin = 1024; // Collect data for 250 miliseconds while ( millis() - start < sampleWindow ) { iVol = analogRead( iMic ); // This is the max of the 10-bit ADC so this loop will include all readings if (iVol < 1024) { if (iVol > signalMax) { // Save just the max levels signalMax = iVol; } else if (iVol < signalMin) { // Save just the min levels signalMin = iVol; } } } // Max - Min = peak-peak amplitude peakToPeak = signalMax - signalMin; // Convert to volts volts = ( peakToPeak * 3.3 ) / 1024; // Serial Serial.println( volts ); }
setup.ino
// Setup void setup() { // Setup Serial Serial.begin (9600); }
People can contact us: https://www.donluc.com/?page_id=1927
Technology Experience
- Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi,Espressif, etc...)
- Robotics
- Research & Development (R & D)
- Desktop Applications (Windows, OSX, Linux, Multi-OS, Multi-Tier, etc...)
- Mobile Applications (Android, iOS, Blackberry, Windows Mobile, Windows CE, etc...)
- Web Applications (LAMP, Scripting, Java, ASP, ASP.NET, RoR, Wakanda, etc...)
- Social Media Programming & Integration (Facebook, Twitter, YouTube, Pinterest, etc...)
- Content Management Systems (WordPress, Drupal, Joomla, Moodle, etc...)
- Bulletin Boards (phpBB, SMF, Vanilla, jobberBase, etc...)
- eCommerce (WooCommerce, OSCommerce, ZenCart, PayPal Shopping Cart, etc...)
Instructor
- PIC Microcontrollers
- Arduino
- Raspberry Pi
- Espressif
- Robotics
- DOS, Windows, OSX, Linux, iOS, Android, Multi-OS
- Linux-Apache-PHP-MySQL
Follow Us
J. Luc Paquin – Curriculum Vitae
https://www.donluc.com/DLE/LucPaquinCVEngMk2021a.pdf
Web: https://www.donluc.com/
Web: http://www.jlpconsultants.com/
Web: https://www.donluc.com/DLE/
Web: https://www.donluc.com/DLHackster/
Web: https://www.hackster.io/neosteam-labs
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/channel/UC5eRjrGn1CqkkGfZy0jxEdA
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/
Don Luc
Project #16: Sound – SparkFun Qwiic MP3 Trigger – Mk14
——
#donluc #project #electronics #microcontrollers #sound #mp3 #sparkfun #consultant #vlog
——
——
——
SparkFun Qwiic MP3 Trigger
Sometimes you just need an MP3 to play. Whether it’s a theme song as you enter the room or a power song when you are working out. The SparkFun Qwiic MP3 Trigger takes care of all the necessary requirements, all you need to do is send a simple I2C command and listen to whatever is on your micro SD card. Utilizing our handy Qwiic system, no soldering is required to connect it to the rest of your system. However, we still have broken out 0.1″-spaced pins in case you prefer to use a breadboard.
When a USB-C cable is connected to the Qwiic MP3 Trigger the contents of the microSD card appears as a jump drive. Simply plug in the Qwiic MP3 Trigger and you’ll be transferring MP3s. Sound output is provided via a 3.5mm headphone jack or poke-home connector allowing an external speaker to be connected without soldering.
We’ve written an extensive Arduino library to make MP3 playing over I2C a breeze. Play tracks, change volume, play next/previous, check if track is playing, stop play, change EQ, and change I2C address are all supported.
- 3.3V
- Volume, EQ setting, and I2C address settings stored in non-volatile memory and loaded at each power-on.
- microSD supports 128MB to 32GB cards.
- Trigger pins 1, 2, 3, and 4.
- Up to 255 tracks can be loaded onto the SD card and triggered via the I2C interface.
- USB-C Connector.
- Qwiic Connector.
T001.mp3
To be, or not to be, that is the question: Whether ’tis nobler in the mind to suffer The slings and arrows of outrageous fortune, Or to take Arms against a Sea of troubles, And by opposing end them: to die, to sleep No more; and by a sleep, to say we end The heart-ache, and the thousand natural shocks That Flesh is heir to?
William Shakespeare – Hamlet
T002.mp3
Two things are infinite: the universe and human stupidity; and I’m not sure about the universe.
Albert Einstein
T003.mp3
If you go to bed at night without learning something new that day, your day is not complete.
Luc Paquin
T004.mp3
Exterminate!
Dalek
People can contact us: https://www.donluc.com/?page_id=1927
Technology Experience
- Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi,Espressif, etc…)
- Robotics
- Research & Development (R & D)
- Desktop Applications (Windows, OSX, Linux, Multi-OS, Multi-Tier, etc…)
- Mobile Applications (Android, iOS, Blackberry, Windows Mobile, Windows CE, etc…)
- Web Applications (LAMP, Scripting, Java, ASP, ASP.NET, RoR, Wakanda, etc…)
- Social Media Programming & Integration (Facebook, Twitter, YouTube, Pinterest, etc…)
- Content Management Systems (WordPress, Drupal, Joomla, Moodle, etc…)
- Bulletin Boards (phpBB, SMF, Vanilla, jobberBase, etc…)
- eCommerce (WooCommerce, OSCommerce, ZenCart, PayPal Shopping Cart, etc…)
Instructor
- PIC Microcontrollers
- Arduino
- Raspberry Pi
- Espressif
- Robotics
- DOS, Windows, OSX, Linux, iOS, Android, Multi-OS
- Linux-Apache-PHP-MySQL
Follow Us
J. Luc Paquin – Curriculum Vitae
https://www.donluc.com/DLE/LucPaquinCVEngMk2021a.pdf
Web: https://www.donluc.com/
Web: http://www.jlpconsultants.com/
Web: https://www.donluc.com/DLE/
Web: https://www.donluc.com/DLHackster/
Web: https://www.hackster.io/neosteam-labs
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/channel/UC5eRjrGn1CqkkGfZy0jxEdA
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/
Don Luc