erg144

Member Since: September 27, 2011

Country: United States

Profile

Spoken Languages

English

Programming Languages

Java, C, C++

Universities

UCI

Expertise

Software

  • Tutorial - Processor Interrupts with Arduino | about 2 years ago

    I just recently got in trouble using interrupts with I2C. I am using a port expander (MCP23008) which will generate an interrupt on any of the bit changes. Great function, easy to use, except - that during the ISR (Interrupt Service Routine) I was trying to read the device to determine which bit changed. Bad idea, this chip uses the I2C communications which require interrupts, but interrupts are turned off during an ISR and everything goes kinda south.

    Bottom line - don’t do things that will require an interrupt during an ISR; rather, set a flag that will be “POLLED” to let some non-interrupt routine read the device.

  • Product WRL-11049 | about 2 years ago

    What is used for the antenna for this product. Seems if you want a PCB trace antenna you need a 4 layer board. Does SparkFun have the antenna products also?

  • Product WRL-10505 | about 3 years ago

    Sorry about the formatting
    ++++++++++++++++++++
    char buffer[100];
    int idx=0;
    void setup() {
    Serial1.begin(9600);
    idx=0;
    SerialUSB.println(“Enter command”);
    }
    void printCommand(){
    buffer[idx]=‘\0’;
    SerialUSB.print(“command: ”);
    SerialUSB.println(buffer);
    Serial1.println(buffer);
    readResponse();
    idx=0;
    }
    void clearBuffer(){
    for(int x=0;x < 100;x++){
    buffer[x]=‘\0’;
    }
    }
    void readResponse(){
    idx=0;
    clearBuffer();
    delay(500);
    while(Serial1.available() && idx < 98){
    buffer[idx++]= Serial1.read();
    }
    SerialUSB.print(“response: ”);
    SerialUSB.println(buffer);
    clearBuffer();
    }
    void echoChar(char c){
    SerialUSB.print(“ char: ”);
    SerialUSB.print©;
    }
    void loop() {
    // clearBuffer();
    if(SerialUSB.available()>0){
    while(SerialUSB.available()>0){
    buffer[idx++]=SerialUSB.read();
    }
    printCommand();
    }
    }

  • Product WRL-10505 | about 3 years ago

    Just got this board and (because I mostly have no idea what I’m doing) have been only moderately successful.
    Hooked up to a Maple board (an arduino board with a bit more power/memory and I/O). The board has multiple uarts (I’m using 1) and support for USB so the program will need a bit of mods for the Arduino
    connected 4 wires pwr, gnd tx1 (wired to rx on the wifi) and rx1 (wired to tx on tlhe wifi)
    This simple minded program below will allow you to enter the commands on the USB serial, submit them to the wifi and echo the response.
    Hope this helps someone.
    Here is the initial stuff I did to associate my network (my ssid=f3wk) I use wpa2 security
    command: AT+WPAPSK=f3wk,mysecretkey
    response: part of my secretkey
    Computing PSK from SSID and PassPhrase…
    command: AT+WA=f3wk
    response: Gateway
    192.168.1.99: 255.255.255.0: 192.168.1.1
    OK
    command: AT+NSTAT=?
    response: .0 DNS2=0.0.0.0
    Rx Count=26 Tx Count=883

  • Product DEV-09534 | about 3 years ago

    I can not seem to find any documentation on this. Here is my question.
    Does the 2 wire serial have any commands to write to the SD card? (that is, send a file to the sd card to play?)
    If not, does this device have any way of sending the raw data over serial from some other source?
    I’m thinking the the SD card has to have the audio on the card before inserting into the player - is this correct?
    thx

No public wish lists :(