AprilBrother / cactus-micro

Cactus Micro - a tiny size arduino compatible board plus WIFI chip esp8266.
12 stars 5 forks source link

Can't to the cactus micro #3

Closed imaustink closed 9 years ago

imaustink commented 9 years ago

I can't even make my cactus run the blink demo:

Arduino: 1.6.1 (Mac OS X), Board: "LilyPad Arduino USB"

Build options changed, rebuilding all

Sketch uses 4,780 bytes (16%) of program storage space. Maximum is 28,672 bytes. Global variables use 151 bytes (5%) of dynamic memory, leaving 2,409 bytes for local variables. Maximum is 2,560 bytes. avrdude: butterfly_recv(): programmer is not responding Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

This report would have more information with "Show verbose output during compilation" enabled in File > Preferences.

volca commented 9 years ago

Please use Arduino 1.0.6 for Cactus Micro. It's more stable.

thihaElec commented 8 years ago

Then, what will be the point of getting cactus micro if latest Arduino IDE doesn't support? I'd rather get an Arduino Micro or Nano with ESP8266

volca commented 8 years ago

In fact I have used Arduino 1.6.8 under OSX months.

thihaElec commented 8 years ago

with or without espduino firmware?

volca commented 8 years ago

All are ok.

thihaElec commented 8 years ago

yeah...it shouldn't matter. I am using 1.6.7 on window and facing compilation error on httpPost example. same problem as imaustink on String error. Only happen to Window?

volca commented 8 years ago

Did you choose right board type - LilyPad USB?

thihaElec commented 8 years ago

yes. i can compile/download other program except httpPost example

volca commented 8 years ago

I fixed a syntax error for function readString(); Please replace the function with the code

String readString(
    long timeout, 
    String target1, 
    String target2 = "", 
    String target3 = "",
    String target4 = ""
) {
    String data;
    char a;
    unsigned long start = millis();

    while (millis() - start < timeout) {
        while(Serial1.available() > 0) {
            a = Serial1.read();
            if(a == '\0') {
                continue;
            }
            data += a;
            Serial.write(a);
        }

        if (data.indexOf(target1) != -1) {
            break;
        } 

        if ((target2 != "") && (data.indexOf(target2) != -1)) {
            break;
        }

        if ((target3 != "") && (data.indexOf(target3) != -1)) {
            break;
        }

        if ((target4 != "") && (data.indexOf(target4) != -1)) {
            break;
        }
    }

    return data;
}