Pages: 1 [2]   Go Down
Author Topic: Rugged Audio Shield for Arduino  (Read 13390 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Rugged Circuit,

I have some problem to solve and I need the sampling frequency at 22050Hz. Since we know that for Fs=22050 so meaning that 1s = 22050 data. So, I want to do some frame analysis and for the time being the recording is still runinng. For example:

While recording i want to frame the data to 1024 data only, then from x= 1024 i want to do a simple calculation, x.^2..

So, from the shield how can i start to program it? Any suggestion?

Thank You
Logged

Netherlands
Offline Offline
Newbie
*
Karma: 0
Posts: 5
like to try new things
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi All

Recently I bought the Rugged Audio Shield, to combine it with my Arduino UNO.
I would like to load the file "RecordWAV.ino" which I found on
https://github.com/RuggedCircuits/Rugged-Audio-Shield-Library/tree/master/examples/RecordWAV
When I try to load the file using the Arduino software, I get a load of errors.
Code:
Rec_PlayBack:31: error: 'RAS' does not name a type
Rec_PlayBack.cpp: In function 'void setup()':
Rec_PlayBack:34: error: 'RAS' was not declared in this scope
Rec_PlayBack:43: error: 'SOURCE_MONO' was not declared in this scope
Rec_PlayBack:43: error: 'SOURCE_MIC' was not declared in this scope
Rec_PlayBack.cpp: In function 'void loop()':
Rec_PlayBack:53: error: 'RAS' was not declared in this scope
So I try to load it via the Arduino UNO. But the errors already pop up during compiling.
Do I need other software to load this file?
I feel pretty stupid. What do I do wrong? What should I read?

I don't have a lot of experience with Arduino, but I did make a nice 24Vdc/4KW bidirectional motor controller using a Arduino UNO.
So making a record and playback sampler shouldn't be so difficult I guess....

Any help is appreciated!
Cheer; nico.

Logged

Ayer, Massachusetts, USA
Offline Offline
Edison Member
*
Karma: 50
Posts: 1767
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

At a guess, I would suspect you would need to install RAS.h and RAS.cpp into a RAS directory that is in your libraries directory.  On my linux system that would be in ~/sketchpad/libraries.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 7
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all,

I bought RC Audio Shield more then year ago and unfortunately have to say that I was rather disappointed about results.
I never used it since.

Here is a short excerpt from a mail I wrote to RC. just to say that the guys never updated their answer:

    Hello guys! [...] I got big expectations about your Audio Shield. I just got hooked up by the very first line of your description: "playing audio files from a microSD card (16-bit mono/stereo WAV)". Now I realize that I was too euphoric about it. Because I marginalized the sentence 9 lines further: "12-bit audio input and output resolution". What is the use to put information about playback of 16-bit CD-quality files at the first, if the nominal 12-bit resolution will reduce the sound quality (by decreasing dynamic range / adding noise) anyway?.. Please don't say it is just about marketing. I like the build quality and features of your audio board. It feels sturdy and nice. But now I realize that the quality of audio playback just don't fit my needs. 16-bit audio? No way. So why to mention it at all?.. OK, let's assume it is all about noisy and cool 12-bit sound. Lo-Fi, so to say. Cool guys dig it. I started to put test WAVs on the micro SD. But even if I made neat fade-ins / fade-outs (means from- and to digital zero), the playback on RC Audio Shield always makes a loud, big and scary "bump" both at the beginning and at the end of respective audio file. Should it be like that?.. Please do say it should'nt. I was happy to think that RD Audio Shield will replace my cumbersome Akai S5000 Sampler for playback. But it seems I rather will be fine with Arduino / MIDI Shield (not tested it yet) + Sampler instead - too bad. :-( best, Girts

Hello Girts,

Thank you for your detailed feedback. We will use it to look into the "bumps" at the beginning and end of the sound, and to improve the design for the next revision.

Best regards,

--
Rugged Circuits Support
<support@ruggedcircuits.com>
http://www.ruggedcircuits.com

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I fixed the "bump" at the beginning and end of playing a wav file by explicitly calling "stop" in the firmware. See pull request here: https://github.com/RuggedCircuits/Rugged-Audio-Shield-Firmware/pull/1
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello everyone!
I am a newbie in the Arduino world, having lots of fun, but ran into a problem.
I am trying to combine a Rugged Audio Shield with an Arduino WiFi shield on top of an Arduino Uno.
I got the Audio shield to work by itself, I got the WiFi to work by itself, but when I plug in the 3 of them together, in no matter what order, I keep getting the message "WiFi shield not present" (not sure this is the exact message, but...).
Is there other ways to connect them, or at least how do I diagnose why the WiFi shield stops working when the Audio shield is present?

Appreciate any comments and suggestions!
h
Logged

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 551
Posts: 46256
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
how do I diagnose why the WiFi shield stops working when the Audio shield is present?
Both shields use SPI to talk to the Arduino, with different SS pins to define which slave the Arduino is talking to. What it comes down to is your code. Where is it?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the reply Paul.
I am just trying to run one of the sample sketches that come with the WiFi library. Here's the code:
/*
  Web client
 
 This sketch connects to a website (http://www.google.com)
 using a WiFi shield.
 
 This example is written for a network using WPA encryption. For
 WEP or WPA, change the Wifi.begin() call accordingly.
 
 This example is written for a network using WPA encryption. For
 WEP or WPA, change the Wifi.begin() call accordingly.
 
 Circuit:
 * WiFi shield attached
 
 created 13 July 2010
 by dlf (Metodo2 srl)
 modified 31 May 2012
 by Tom Igoe
 */


#include <SPI.h>
#include <WiFi.h>

// char ssid[] = "yourNetwork"; //  your network SSID (name)
char ssid[] = "radio1";
// char pass[] = "secretPassword";    // your network password (use for WPA, or use as key for WEP)
char pass[] = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
int keyIndex = 0;            // your network key Index number (needed only for WEP)

int status = WL_IDLE_STATUS;
// if you don't want to use DNS (and reduce your sketch size)
// use the numeric IP instead of the name for the server:
IPAddress server(173,194,73,105);  // numeric IP for Google (no DNS)
//char server[] = "www.google.com";    // name address for Google (using DNS)

// Initialize the Ethernet client library
// with the IP address and port of the server
// that you want to connect to (port 80 is default for HTTP):
WiFiClient client;

void setup() {
  //Initialize serial and wait for port to open:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }
 
  // check for the presence of the shield:
  if (WiFi.status() == WL_NO_SHIELD) {
    Serial.println("WiFi shield not present");
    // don't continue:
    while(true);
  }
 
  // attempt to connect to Wifi network:
  while ( status != WL_CONNECTED) {
    Serial.print("Attempting to connect to SSID: ");
    Serial.println(ssid);
    // Connect to WPA/WPA2 network. Change this line if using open or WEP network:   
    // status = WiFi.begin(ssid, pass);
    // Connect to WEP
    status = WiFi.begin(ssid, keyIndex, pass);
 
    // wait 10 seconds for connection:
    delay(10000);
  }
  Serial.println("Connected to wifi");
  printWifiStatus();
 
  Serial.println("\nStarting connection to server...");
  // if you get a connection, report back via serial:
  if (client.connect(server, 80)) {
    Serial.println("connected to server");
    // Make a HTTP request:
    client.println("GET /search?q=arduino HTTP/1.1");
    client.println("Host:www.google.com");
    client.println("Connection: close");
    client.println();
  }
}

void loop() {
  // if there are incoming bytes available
  // from the server, read them and print them:
  while (client.available()) {
    char c = client.read();
    Serial.write(c);
  }

  // if the server's disconnected, stop the client:
  if (!client.connected()) {
    Serial.println();
    Serial.println("disconnecting from server.");
    client.stop();

    // do nothing forevermore:
    while(true);
  }
}


void printWifiStatus() {
  // print the SSID of the network you're attached to:
  Serial.print("SSID: ");
  Serial.println(WiFi.SSID());

  // print your WiFi shield's IP address:
  IPAddress ip = WiFi.localIP();
  Serial.print("IP Address: ");
  Serial.println(ip);

  // print the received signal strength:
  long rssi = WiFi.RSSI();
  Serial.print("signal strength (RSSI):");
  Serial.print(rssi);
  Serial.println(" dBm");
}



Logged

Pages: 1 [2]   Go Up
Jump to: