bluefruit problems.

For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
whatigot1985
 
Posts: 15
Joined: Mon Aug 04, 2014 11:34 pm

bluefruit problems.

Post by whatigot1985 »

I am trying to run the bluefruit from my computers molex connector. it is also connect directly to a trinketpro. i have removed the vin pin between them in order to not short the boards. all the bluefruit adapter does is blink slowly red. i know it is getting enough power, but can not figure out why it or the spare one i have tried do not want to work correctly. It all worked fine when i had it tested with usb and the vin pin connected( had not hardwired them in yet. but weather i power it thru the trinket pro(also wired in (jstconnector)) or separately, i am having issues .link to photos https://photos.google.com/share/AF1QipO ... 5XUXprQlFB

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: bluefruit problems.

Post by adafruit_support_rick »

What kind of computer? Does the EZ-Link appear as a port?

User avatar
whatigot1985
 
Posts: 15
Joined: Mon Aug 04, 2014 11:34 pm

Re: bluefruit problems.

Post by whatigot1985 »

its a windows 10 machine. i eneded up saying nvm mine to the trinket pro and the bluefuuit adaptor. I bought a feather bluefruit. now im having the issue with not being able to upload to that trying over usb first. i have updated all drivers and made sure i had everything downloaded for the proper board. but i get this back every time .
processing.app.debug.RunnerException
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:141)
at cc.arduino.UploaderUtils.upload(UploaderUtils.java:78)
at processing.app.Sketch.upload(Sketch.java:1186)
at processing.app.Sketch.exportApplet(Sketch.java:1160)
at processing.app.Sketch.exportApplet(Sketch.java:1132)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2381)
at java.lang.Thread.run(Thread.java:745)
Caused by: processing.app.SerialException: Error touching serial port 'COM3'.
at processing.app.Serial.touchForCDCReset(Serial.java:87)
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:130)
... 6 more
Caused by: jssc.SerialPortException: Port name - COM3; Method name - openPort(); Exception type - Port not found.
at jssc.SerialPort.openPort(SerialPort.java:167)
at processing.app.Serial.touchForCDCReset(Serial.java:81)
... 7 more
if i do not get that i get
avrdude: no programmer has been specified on the command line or the config file
Specify a programmer using the -c option and try again
made sure i have the correct board selected and usbtiny selected. also made sure i have a high quality usb cable to transfer data.

User avatar
whatigot1985
 
Posts: 15
Joined: Mon Aug 04, 2014 11:34 pm

Re: bluefruit problems.

Post by whatigot1985 »

i wiped all my sketches and lib, its incrementally working now. I can not for the life of me get it to upload via Bluetooth tho

User avatar
whatigot1985
 
Posts: 15
Joined: Mon Aug 04, 2014 11:34 pm

Re: bluefruit problems.

Post by whatigot1985 »

ok i think i got uploading via usb working, but i still cant upload via bluetooth. also my sketch that was working in on my trinket pro, now does not work on the feather. Only the button and one strip works the other two do not.

Code: Select all

#include <Adafruit_NeoPixel.h>
#define PIN 


//#include <IRremote.h>
int NOP = 166; //number of pixels including 4 square shelfs

// for pixels with white half green,red,blue,white
//blue =11
//green = 10
//yellow = 9
Adafruit_NeoPixel strip = Adafruit_NeoPixel(100, 9, NEO_GRBW + NEO_KHZ800);// bottom strip
Adafruit_NeoPixel strip1 = Adafruit_NeoPixel(100, 11, NEO_GRBW + NEO_KHZ800);// top strip 6 is green 5 is blue
Adafruit_NeoPixel strip2 = Adafruit_NeoPixel(40, 3, NEO_GRBW + NEO_KHZ800);
Adafruit_NeoPixel strip3 = Adafruit_NeoPixel(8, 12, NEO_GRBW + NEO_KHZ800);

// IMPORTANT: To reduce NeoPixel burnout risk, add 1000 uF capacitor across
// pixel power leads, add 300 - 500 Ohm resistor on first pixel's data input
// and minimize distance between Arduino and first pixel.  Avoid connecting
// on a live circuit...if you must, connect GND first.

//constant- values that do not change
const int button = 5; //silver button  IF YOU ARE USING MORE ADD MORE WITH DIFFRENT NAMES + pin

//variables   - i tems that can be changed
int button_state   = 0;
int last_state     = 0;
int button_value   = 0;
int push_counter   = 0;
int Topleft        = 129;
int bottomleft     =86;
int bottomright    =53;
int Topright       = 146;
//int RECV_PIN = 16;
int ircomcode = 0;
//int lastIR = 0;
int up = 2011287798;
int down = 2011279606;
int right = 2011291894;
int leftbutt = 2011238646;




int left = NOP; //pixel left
int pix = 0; // to be current pixel

int input;
int wait = 1000;
//IRrecv irrecv(RECV_PIN);
//decode_results results;


void setup() {
 // Serial.begin(9600);
  //delay(500);
 //irrecv.enableIRIn(); // Start the receiver
  
  strip.begin();
  strip.show();
  strip1.begin();
  strip1.show();
  strip2.begin();
  strip2.show();
  strip3.begin();
  strip3.show();
  
  
  
  //set all pixels to 'off'
  //initialize the button pin as a input:
  pinMode(button, INPUT);
}


void loop() {
  button_state = digitalRead(button); // see if button is pressed or not
        
      

 //if (irrecv.decode(&results)) {
  //Serial.println(results.value, DEC);
   //ircomcode = (results.value, DEC);
 //irrecv.resume(); // Receive the next value
 // Serial.println(ircomcode);
  //Serial.println(right);
 // delay(500);
 //}

//Start IR IF

/*

    if(ircomcode == up){// remote up
      Serial.println("up");
      strip.setBrightness(40);
      colorWipe(strip.Color(0,0,0,255),40);
      strip.show();
      stripshow;
    }
    if(ircomcode == down){// remote down
      Serial.println("down");
      strip2.setBrightness(40);
      colorWipe2(strip.Color(244, 98, 7), 20);
      stripshow;
    }
    if(ircomcode == right){// remote right
      Serial.println("right");
      strip2.setBrightness(40);
      colorWipe2(strip.Color(155,34,248), 20);
      stripshow;
    }
    if(ircomcode == leftbutt){// remote left
      Serial.println("left");
    }
    if(ircomcode == 2011282166){// remote center
      Serial.println("center");
    }
    if(ircomcode == 2011250934){// remote menu
      Serial.println("menu");
    }
    if(ircomcode == 2011265782){// remote play/pause
      Serial.println("play/pause");
    }
    
  */
  
//END IR IF


  if (button_state != last_state) {  // if state has chaged (if you pressed button)
    if(button_state == HIGH) { // if the button is currently pushed in (providing power)
      if(button_value == 0){ // if it has been pressed once
        button_value ++;
            strip1.setBrightness(60);
            strip.setBrightness(60);
           strip2.setBrightness(40);
          strip3.setBrightness(100);
          delay(wait);
          stripshow;
          //stripshow:
        
  
        // teal color   colorWipe(strip.Color(20, 199, 233), 20);
        colorWipe2(strip.Color(0,0,0,255),40);
        strip2.show();
        //colorWipe2(strip2.Color(244, 98, 7), 20);
        colorWipe(strip.Color(244, 98, 7), 20);
        strip.show();
        colorWipe1(strip.Color(244, 98, 7), 20);
        strip1.show();
        
        colorWipe3(strip.Color(0,0,0,255),40);
        strip3.show();
        colorCenterExpland(strip.Color(155,34,248), 20); 
        colorCenterBottomExpand(strip.Color(144,1,255), 20);
        colorShelfs(strip.Color(0, 0, 0,0), 20);
        Serial.println("bright 240");
        stripbright;
        //stripshow;  
         
         
         
         
        
      }//incrment then fall back out of loop
      else if(button_value == 1){// if not a value of  0

          stripbright;
          Serial.println("bright 70");
          delay(wait);
          stripshow;

        button_value ++;
        
      }
      else if(button_value == 2){// if not a value of  0

         colorWipe(strip.Color(109, 237, 11), 20);
         colorWipe1(strip.Color(109, 237, 11), 20);
        colorWipe(strip2.Color(109, 237, 11), 20);
         Serial.println("bright 0");
         //stripbright;
         stripshow;
        // holloween colors
        button_value ++;
        //button_value --;
      }

      else if(button_value == 3){// if not a value of  0

         colorWipe(strip.Color(0, 0, 0,0), 20);
         colorWipe1(strip.Color(0, 0, 0,0), 20);
         colorWipe2(strip2.Color(0, 0, 0,0), 20);
         colorWipe3(strip3.Color(0, 0, 0,0), 20);
         Serial.println("bright 0");
         rainbowCycle;
         
         stripshow;
        
        button_value --;
        button_value --;
        button_value --;
      }
    }
 }


}// end of loop


//----------------------------------------------------------------------------------------------------------------------------------
void colorWipe(uint32_t c, uint8_t wait) {
  for(uint16_t i=0; i<strip.numPixels(); i++) {
    strip.setPixelColor(i, c);
    strip.show();
    delay(wait);
  }
}
//-----

void colorWipe1(uint32_t c, uint8_t wait) {
  for(uint16_t i=0; i<strip1.numPixels(); i++) {
    strip1.setPixelColor(i, c);
    strip1.show();
    delay(wait);
  }
}
//-----
void colorWipe2(uint32_t c, uint8_t wait) {
  for(uint16_t i=0; i<strip2.numPixels(); i++) {
    strip2.setPixelColor(i, c);
    strip2.show();
    delay(wait);
  }
}
//-----
void colorWipe3(uint32_t c, uint8_t wait) {
  for(uint16_t i=0; i<strip3.numPixels(); i++) {
    strip3.setPixelColor(i, c);
    strip3.show();
    delay(wait);
  }
}


//----------------------------------------------------------------------------------------------------------------------------------
void colorWhite(uint32_t c, uint8_t wait) {
  for(uint16_t i=0; i<strip.numPixels(); i++) {
    strip.setPixelColor(i,0,0,0,255);
    strip.show();
    delay(wait);
  }
}
//----------------------------------------------------------------------------------------------------------------------------------
void colorCenterTop(uint32_t c, uint8_t wait) {
  for(uint16_t i=Topright; i<strip.numPixels(); i++) {
    if(i<Topleft){
      strip.setPixelColor(i,c);
    }
    strip.show();
    delay(wait);
  }
}
//----------------------------------------------------------------------------------------------------------------------------------
void colorCenterExpland(uint32_t c, uint8_t wait){

  int topLmR = (Topright - Topleft);
  int  divide = (topLmR / 2);
  int centertop = (divide + Topleft);
  int tl = centertop;
  int tr = centertop;
  
  for(uint16_t i=Topright; i<strip.numPixels(); i++){

    if(tr != Topright){  
        strip.setPixelColor(tl,c);
        strip.setPixelColor(tr,c);
      tr ++;
      tl --;
    }
    strip.show();
    delay(wait);
    
  }  
}
//---------------------------------
void stripbright(uint8_t, uint8_t wait){
  strip.setBrightness(20);
  delay(wait);
  strip1.setBrightness(20);
  delay(wait);
  strip2.setBrightness(20);
  delay(wait);
  strip3.setBrightness(20);
  delay(wait);
  stripshow;
}
//----------------------------------
void stripshow(uint8_t, uint8_t wait){
          strip.show();
          strip1.show();
          delay(2000);
         strip2.show();
         delay(2000);
         strip3.show();
}  
//----------------------------------------------------------------------------------------------------------------------------------
void colorCenterBottomExpand(uint32_t c, uint8_t wait){

  int bottomLmR = (bottomleft - bottomright);
  int lessone = (bottomLmR - 1);
  int divide = (lessone /2);
  int centerbottom = (divide + bottomright);
  int bl = centerbottom;
  int br = centerbottom;
  
  for(uint16_t i=bottomright; i<strip.numPixels(); i++){

    if(bl != bottomleft){  
        strip.setPixelColor(bl,c);
        strip.setPixelColor(br,c);
      br --;
      bl ++;      
      
    }
    strip.show();
    delay(wait);
    
  }  
}
//----------------------------------------------------------------------------------------------------------------------------------
void colorCenterBottom(uint32_t c, uint8_t wait) {
  for(uint16_t i=54; i<strip.numPixels(); i++) {
    if(i<86){
      strip.setPixelColor(i,c);
    }
    strip.show();
    delay(wait);
  }
}
//----------------------------------------------------------------------------------------------------------------------------------
void colorShelfs(uint32_t c, uint8_t wait) {
  for(uint16_t i=162; i<strip.numPixels(); i++) {
    if(i<167){
       strip.setPixelColor(i,0,0,0,255);
    }
    strip.show();
    delay(wait);
  }
}
//---------------------------------------------------------------
void rainbowCycle(uint8_t wait) {
  uint16_t i, j;

  for(j=0; j<256*5; j++) { // 5 cycles of all colors on wheel
    for(i=0; i< strip2.numPixels(); i++) {
      strip2.setPixelColor(i, Wheel(((i * 256 / strip2.numPixels()) + j) & 255));
    }
    strip2.show();
    delay(wait);
  }
}

//---------------------------------------------------------------
void rainbow(uint8_t wait) {
  uint16_t i, j;

  for(j=0; j<256; j++) {
    for(i=0; i<strip.numPixels(); i++) {
      strip.setPixelColor(i, Wheel((i+j) & 255));
    }
    strip.show();
    delay(wait);
  }
}


// Input a value 0 to 255 to get a color value.
// The colours are a transition r - g - b - back to r.
uint32_t Wheel(byte WheelPos) {
  WheelPos = 255 - WheelPos;
  if(WheelPos < 85) {
    return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);
  }
  if(WheelPos < 170) {
    WheelPos -= 85;
    return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);
  }
  WheelPos -= 170;
  return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
}
Last edited by whatigot1985 on Sat Oct 29, 2016 1:58 am, edited 1 time in total.

User avatar
whatigot1985
 
Posts: 15
Joined: Mon Aug 04, 2014 11:34 pm

Re: bluefruit problems.

Post by whatigot1985 »

when i do the strand test and direct it to each individually each strand receives data. but they are not smooth at all( tends to flicker, and just change.
Each strip has its own power supply.

i have added delay in between each color change, and the other strips are now working. still flickering quite badly(while changing)
each has about a 330 resistor per signal wire

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: bluefruit problems.

Post by adafruit_support_rick »

Do you have a common ground between the strips and the feather? Lack of ground will cause flickering

Not sure what you mean by uploading via bluetooth. You can't do that with a feather BLE. That only works with an EZ-Link.

Code: Select all

  if (button_state != last_state) {  // if state has chaged (if you pressed button)
I don't think you ever change last_state.

User avatar
whatigot1985
 
Posts: 15
Joined: Mon Aug 04, 2014 11:34 pm

Re: bluefruit problems.

Post by whatigot1985 »

adafruit_support_rick wrote:Do you have a common ground between the strips and the feather? Lack of ground will cause flickering

Not sure what you mean by uploading via bluetooth. You can't do that with a feather BLE. That only works with an EZ-Link.

Code: Select all

  if (button_state != last_state) {  // if state has chaged (if you pressed button)
I don't think you ever change last_state.
that is the detect for when i push the button i have connected. the stat changes when the button has been pressed, then the if statement runs. also i thought the feather could upload via bluetooth. in that case. would you be so kind as to help me with my original problem then. i will switch back the the trinket pro and the ez link(ill use the feather for something else). since that tended to run the code fine anyway. If it is not to much trouble.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: bluefruit problems.

Post by adafruit_support_rick »

So, going back to the EZ-Link. First of all, are you able to pair it with your computer?
The LED will only blink fast when there's an active connection to it from the computer. For instance, can you connect to it from the Serial Monitor in Arduino?

User avatar
whatigot1985
 
Posts: 15
Joined: Mon Aug 04, 2014 11:34 pm

Re: bluefruit problems.

Post by whatigot1985 »

adafruit_support_rick wrote:So, going back to the EZ-Link. First of all, are you able to pair it with your computer?
The LED will only blink fast when there's an active connection to it from the computer. For instance, can you connect to it from the Serial Monitor in Arduino?
i have tried two of them. they use to connect . now they stay in flux between connected and disconnected. its fine when i use the usb on the trinket tho and have the vin connected again

update after un-pairing , it now does not re-pair

also it is blinking about once ever 3 seconds(the red led). both of them do this.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: bluefruit problems.

Post by adafruit_support_rick »

Since you have two EZ-Links, and they both behave the same way, I'm thinking that the problem is not with the EZ-Links.

- Are you using the built-in Windows bluetooth system, or have you installed a 3rd-party bluetooth system?

- Are you using the bluetooth hardware built into the computer, or are you using a bluetooth adapter?

- Do you have a different computer you can try?

User avatar
whatigot1985
 
Posts: 15
Joined: Mon Aug 04, 2014 11:34 pm

Re: bluefruit problems.

Post by whatigot1985 »

adafruit_support_rick wrote:Since you have two EZ-Links, and they both behave the same way, I'm thinking that the problem is not with the EZ-Links.

- Are you using the built-in Windows bluetooth system, or have you installed a 3rd-party bluetooth system?

- Are you using the bluetooth hardware built into the computer, or are you using a bluetooth adapter?

- Do you have a different computer you can try?
I will try another computer. I am using the build in windows bluetooth software. I have 2 dongles i have tried. both bt-Le.

User avatar
whatigot1985
 
Posts: 15
Joined: Mon Aug 04, 2014 11:34 pm

Re: bluefruit problems.

Post by whatigot1985 »

whatigot1985 wrote:
adafruit_support_rick wrote:Since you have two EZ-Links, and they both behave the same way, I'm thinking that the problem is not with the EZ-Links.

- Are you using the built-in Windows bluetooth system, or have you installed a 3rd-party bluetooth system?

- Are you using the bluetooth hardware built into the computer, or are you using a bluetooth adapter?

- Do you have a different computer you can try?
I will try another computer. I am using the build in windows bluetooth software. I have 2 dongles i have tried. both bt-Le.
i am having trouble connecting on my other computers also

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: bluefruit problems.

Post by adafruit_support_rick »

Let's try replacing the Ez-Links. See if the problem goes away. First make sure they work normally, then try them in your assembly. You have an FTDI cable. Try the EZLinks alone with the FTDI cable and see if they will pair and stay connected.

Please email [email protected] with a link to this thread for replacement EZ-Links

User avatar
whatigot1985
 
Posts: 15
Joined: Mon Aug 04, 2014 11:34 pm

Re: bluefruit problems.

Post by whatigot1985 »

adafruit_support_rick wrote:Let's try replacing the Ez-Links. See if the problem goes away. First make sure they work normally, then try them in your assembly. You have an FTDI cable. Try the EZLinks alone with the FTDI cable and see if they will pair and stay connected.

Please email [email protected] with a link to this thread for replacement EZ-Links
the ez links do the same when on their own. i do not have an FTDI cable to try on the trinkets.

Locked
Please be positive and constructive with your questions and comments.

Return to “Wireless: WiFi and Bluetooth”