Show Posts
Pages: [1] 2
1  Forum 2005-2010 (read only) / Troubleshooting / Re: blinkm is not listening to arduino on: June 04, 2009, 11:49:43 am
Whoeweeeeeee !
Arduino release 016 solved my problem!
2  Forum 2005-2010 (read only) / Troubleshooting / blinkm is not listening to arduino on: June 03, 2009, 03:54:21 pm
I've received my arduino duemilanove 328 + blinkm today and after reading days of howto's I can finaly begin.

installing serial drivers for the apple
plug the blinkm to analog pin 2 t/m 5 of the arduino board.
plug the usb in the arduino.
starting arduino application, and selecting tty-usbserial.
loading BlinkMcommunicator (or others)

I can see the rx and tx leds of the arduino board flickering.
Then I quit the arduino-0015 application and start the BlinkMSequencer.
connecting, defining, and uploading.

Then I get the message, upload was ok, but nothing happend to the blinkm.
I disconnected the blinkm (afther unplugging the usb). connecting only the power, but nothing.

Afther trying al few other programs and an other blinkm I don't see other options.

Does anybody have a clue what to do next?

3  Forum 2005-2010 (read only) / Syntax & Programs / Re: dynamicly define option # in different menu # on: June 25, 2009, 11:57:21 am
It's great when you type, you think..
And just when I pressed send I came up with my own answer:

int menu[] = {2, 3, 6};

int option_switch() {
if (my_option == menu[my_menu] )      
        my_option = 1;     // if you are at the last menu, go back to the initial menu number
        my_option ++;      // increase the menu number if it's not allready at max.
  Serial.print("Changing to option nr: ");

int menu_switch(){
if (my_menu == 2)      // I only defined 2 menu's, you can add more by increasing this my_menu number)
        my_menu = 1;     // if you are at the last menu, go back to the initial menu number
        my_menu ++;      // increase the menu number if it's not allready at max.
  Serial.print("Changing to menu nr: ");
4  Forum 2005-2010 (read only) / Syntax & Programs / dynamicly define option # in different menu # on: June 25, 2009, 11:53:01 am
Hello there,
I'm stuck in finding my way how to do the following.
With a button I can do the following:
pressing it short = changing an option within a menu
pressing it long = changing between menu's.

So now I need to define
menu1 has 2 options,  menu2 has 3 option, and menu3 = 6 options.
and of course add some actions to the choice I've made.

I'm a bit green when it gets deep in arrays and how to use them this way. I only know the basic how to put information in an array and how to read a value from an array nr.

If someone could give me a hand smiley-wink
Maybe I'm looking in a wrong direction and don't have to use arrays.

I was thinking:
int menu[] = {2, 3, 6};
but how to increment the option when in the selected menu....

5  Forum 2005-2010 (read only) / Interfacing / Re: max with a rotary encoder on: July 03, 2009, 03:17:21 pm
Reading your pdf, it looks like a "normal" rotary-encoder to me.
I'm using sunny's library, which works great to define the upper and lower values. The only thing I miss, is to define an option to choose your own multiplier, so it won't in/de-crement with 1, but 5 for example.

In my program, hue and brightness are both from 0 - 255
I want to slowly choose a hue colour, but go 10 times faster with brightness.
I can only change the code now manually, but I want to feed the library with my variable input. I'm not a good programmer and need some help with coding a library with external input.
6  Forum 2005-2010 (read only) / Interfacing / Re: max with a rotary encoder on: June 18, 2009, 08:31:06 pm
Ok, don't mention the time I wrote this.
I just gave myself some food to read in my previous post, and came up with the idea to exchange the ports 3 & 4 with port 7 and 8.
This solved my problems for the rotary encoder.
I think I now can use the ethernetboard AND the rotary encoder.

    * Timer0 (System timing, PWM 5 and 6)
      Used to keep track of the time the program has been running. The millis() function to return the number of milliseconds since the program started using a global incremented in the timer 0 ISR. Timer 0 is also used for PWM outputs on digital pins 5 and 6.

    * Timer1 (PWM 9 and 10)
      Used to drive PWM outputs for digital pins 9 and 10.
    * Timer2 (PWM 3 and 11)
      Used to drive PWM outputs for digital pins 3 and 11.

And also that my rotary was only counting one way (pin 4, and not 3 who allready was in use).

I slowly begin to understand how to define and the differences the interrupts have, I realy would like to understand more of it.

7  Forum 2005-2010 (read only) / Interfacing / Re: max with a rotary encoder on: June 18, 2009, 05:46:10 am
Everything works now. (counting up & down) when I don't use the ethernetshield.
I think the ethernetshield messed the overflow interrupt up or something like it.

Everytime I put the ethernet board on Arduino, the RotaryEncoder only counts up OR down, but not both ways.
What I've understood was "RotaryEncoder.h" is using the timer/counter on port 11.
Port 11 is also in use by the ethernet board.
See also the for the ports in use.

To use the other timer, I've checked the datasheet and so I modified the RotaryEncoder.cpp with the following:
TIMSK1 |= (1 << TOIE1);
Deleted the compiled.o file and uploaded the code to the board.
The modified code works without an ethernet board, but again when I use the ethernet board, it only counts down, not up.
Also some other flickering is noticable in the lights.

Now I'm looking for a way to use the ethernet controller and the rotary library. I hope this is technically possible.
but I'm a bit lost now.  :-/


Food to read:
8  Forum 2005-2010 (read only) / Interfacing / Re: max with a rotary encoder on: June 18, 2009, 04:11:46 am
This code helps me understanding what to do with debouncing.
I've read in the code that internal pull-ups are used for the A, B and switch.
So connecting the common rotary and switch to ground.
I'm just curious why I only see the Sensibility going up, and not down when I push the button. in the script above.

#include "RotaryEncoder.h"

RotaryEncoder rotary(2, 3, 4);

void setup()


void loop()
    Serial.print("Sensibility: ");

serial OUTPUT, turning the rotary CCW and CW
Sensibility: 40%
Sensibility: 46%
Sensibility: 48%
Sensibility: 49%
Sensibility: 50%
Sensibility: 51%
Sensibility: 52%

Also with Keith Neufeld's 'Quadrature' library I only see increments when rotating both ways..
60      0
61      0
62      0
63      0
9  Forum 2005-2010 (read only) / Troubleshooting / Re: ethershield and LiquidCrystal HD44780 not working on: April 08, 2010, 04:17:50 am
Thank you for sharing your sollution P18F4550.
I've also managed now to work both the display and ethernet together.

I also found out (at least I think I did smiley-wink why it was not working for me.
I changed the ports 11 and 12 to unused ports, as the ethernet board uses 10, 11, 12 and 13.
But the problem was in the lower port range.
I can't use port 3 when the ethernet board is connected.

Strange, as it's an original arduino ethershield board and the documentation doesn't mention pin3 being used.

10  Forum 2005-2010 (read only) / Troubleshooting / ethershield and LiquidCrystal HD44780 not working on: April 07, 2010, 11:29:29 am
I have an Arduino with ethershield working, and the same Arduino with an HD44780 display working.
When I put those together on one Arduino, the display doesn't show anything. The ethershield is working fine.

The code only contains a "Hello World" in the display, and an IP address for the ethershield, so it's pingable.

I've read about the pin's the ethershield uses: 10, 11, 12, and 13 (SPI)
Default LiquidCrystal uses pin 11 and 12 also, but I've changed that and tested it separately with success.

Now I'm stuck  :-/

Does anybody have the same setup managed to get it working?
11  Forum 2005-2010 (read only) / Troubleshooting / Re: Arduino freezes if blinkm is not connected to pwr on: June 23, 2009, 05:01:34 pm
Just mailing with ThingM and I came up with some other findings:

I've read the following:
Both data and clock remain high when the bus is not busy.

This is true. When I don't connect a blinkm and start the l2c bus command BlinkM_stopScript(blinkm_addr); I measure +4,5v

But if I do this with a blinkm connected without power to the blinkm the bus is 0v and will be "bussy".

I think this happens because the blinkm shortens the C & D if it's not powered. I measure 1.4 Mohm between C&D without power to the blinkm. This changes to infinity when the blinkm gets powered.

As this is my measure result, I'm trying to find this information because I also would like to read it in the factsheets of the protocol.
12  Forum 2005-2010 (read only) / Troubleshooting / Arduino freezes if blinkm is not connected to pwr on: June 23, 2009, 12:21:15 pm

I just found out some strange behaviour between arduino and BlinkM.
In my setup I use external psu to power the BlinkM MaxM.
This power will be triggered via arduino.

The strange thing is... When I start up the arduino, it freezes if a BlinkM is connected via the C&D wire, but doesn't have power.
If I disconnect the Clock&Data wire, the blinkm continues running the program like nothing happend (until I cut the power to the blinkm, then arduino freezes again).

I have to remove the Clock AND data wire, removing only one doesn't change a thing.

It took me a while to get here and hope there is some logical explanation for this. I've send an email to BlinkM hopefully they
can explain what happens.

See my other thread about my project and code:
13  Forum 2005-2010 (read only) / Interfacing / Re: ir PNA4601M - what is normal behaviour? on: October 29, 2010, 03:14:54 am
It looks like this one on the photo:

I only have read you should put a resistor between the output of the ir and arduino data line.
Or am I wrong?
14  Forum 2005-2010 (read only) / Interfacing / ir PNA4601M - what is normal behaviour? on: October 28, 2010, 06:22:28 pm
Hi techies,

I'm trying to learn from a PNA4601M connected to arduino.
I've tried several programs, but the thing is:
When I don't send any infrared signal, the receiver still sends data towards arduino like this with the Raw IR commander:

Ready to decode IR!
Heard 3-pulse long IR signal
Heard 1-pulse long IR signal
Heard 1-pulse long IR signal

All this without ever send anything to the receiver. Is it broke?
Also when i hook up a led at the output of the ir it flashes without me sending ir.

I've also tried IRanalyzer.pde, which gave me something like this when I send ir:
Analyze IR Remote
Bit stream detected!
0      0
280      0
280      1
198728      1
198728      0
198832      0
198832      1
19788      1
19788      0
19860      0
19860      1
248744      1
248744      0
248844      0
248844      1
192004      1
192004      0

But I'm not sure how I can translate this to hex, and create an action to it.
Could also someone send me to the right direction to buy a new type of receiver? I'm thinking of: GP1UX511QS. Would this do?

15  Forum 2005-2010 (read only) / Interfacing / Re: BlinkM and BlinkM MaxM differ in hue colour code on: August 16, 2009, 05:00:18 pm
The problem was in the BlinkM software on the board itself.
Contact the store where you bought them, they can change the "broken" MaxM's for you.

Tod from ThingM was very patient with me, and did all the tests I asked for. Unfortunatly Tod had a MaxM that did not had the software problem.
The store where I bought the MaxM had a few more MaxM's with the problem in the software. ThingM's respond for a solution was fast.
They offered great service.

Pages: [1] 2