Archive

For September, 2015

Hard reset a Cree Connected light bulb

3 Comments

Hard Reset Cree Connected Light Bulb

I acquired a few days ago a Wink Hub along with a few Cree Connected light bulbs. I couldn’t pair them. Out of 5 bulbs, I was able to pair only one of them! After reading many posts on the Internet, I have made sure that the Wink Hub is not near my router, the light bulb was in range of the Wink Hub, and so on. I found out that one possible solution was to reset the light bulbs. I found the same recipe on many web sites, which were saying: “Turn the bulb off for 2 seconds, then on for 2 seconds. Repeat three more times. After the fourth cycle, the bulb will flash, indicating that the reset was successful.” It wasn’t working.

I contacted the technical support of Wink. They gave me the following method which worked right away. The method they gave me is:

1. Begin with the bulb turned off
2. Turn the bulb ON for 1 second
3. Turn the bulb OFF for 2 seconds
4. Repeat steps 2 and 3 until the bulb momentarily dims (about 4 or 5 times)
5. It will only dim for a second, signaling that it has been factory reset

Notice on step 2, 1 second, not 2. I could pair my 4 other bulbs without any problem.

Maximum frequency an Arduino can generate

No Comments

What is the maximum frequency an Arduino can generate? Typically, I obtained a frequency of less than 100 kHz using the Arduino function calls. The results were lower than I expected. I also observed that I had a frequency higher by 25 kHz using a pin from the 8 to 13 pin set than a pin from the 0 to 7 pin set. These tests yield a virtually perfect waveform. I obtained almost 4 MHz by accessing the register directly. The waveform was not as good as the waveform of the first four tests. The waveform is given in Figure 1.

Sketch 1 Frequency: 72.6 kHz
Duty Cycle: 47.7%
#include

#define OUTPUT_PIN 3

void setup() {
  pinMode(OUTPUT_PIN, OUTPUT);
}

void loop() {
  digitalWrite(OUTPUT_PIN, HIGH);
  digitalWrite(OUTPUT_PIN, LOW);
}

Sketch 2 Frequency: 74.3 kHz
Duty Cycle: 49.2%
#include

#define OUTPUT_PIN 3

void setup() {
  pinMode(OUTPUT_PIN, OUTPUT);
}

void loop() {
  while(1) {
    digitalWrite(OUTPUT_PIN, HIGH);
    digitalWrite(OUTPUT_PIN, LOW);
  }
}

Sketch 3 Frequency: 96.94 kHz
Duty Cycle: 49%
#include

#define OUTPUT_PIN 8

void setup() {
  pinMode(OUTPUT_PIN, OUTPUT);
}

void loop() {
  digitalWrite(OUTPUT_PIN, HIGH);
  digitalWrite(OUTPUT_PIN, LOW);
}

Sketch 4 Frequency: 96.94 kHz
Duty Cycle: 49%
#include

#define OUTPUT_PIN 8

void setup() {
  pinMode(OUTPUT_PIN, OUTPUT);
}

void loop() {
  while(1) {
    digitalWrite(OUTPUT_PIN, HIGH);
    digitalWrite(OUTPUT_PIN, LOW);
  }
}

Sketch 5 Frequency: 3.97 MHz
Duty Cycle: 25.6%
#include

void setup() {
  DDRB = B00000001;
}

void loop() {

  while(1) {
    PORTB = 0xff;
    PORTB = 0x00;
  }
}

Click on the image to improve the quality.

Wave generated by modifying directly the port

Figure 1: Waveform generated by modifying directly the port (Sketch 5)

Blue Taste Theme created by Jabox