RGB Backlight and Rotary encoder

User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: RGB Backlight and Rotary encoder

Post by MikeB »

It builds OK in 1.6.10, which is what I have installed. I'll see if I can find out what has changed in 1.6.12.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: RGB Backlight and Rotary encoder

Post by MikeB »

Must be some compiler option that is different.
"requestEvent" is a forward reference, the IDE used to handle these.
There is a function "requestEvent()" at the end of the file, try moving this function to before the setup() function. That stops it being a forward reference.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
OctavioS
Posts: 657
Joined: Sun Aug 17, 2014 11:54 pm
Country: Portugal
Location: Madeira

Re: RGB Backlight and Rotary encoder

Post by OctavioS »

I did, same problem occured and the line "Wire.onRequest(requestEvent); // register event" was highlighted.
Sem Título.png
2x - Turnigy 9X with 9xtreme board;
2x - Turnigy 9XRpro ;
Frsky Taranis & Taranis +;
Horus x10s;
Horus x12s;
Radiomaster TX16S Max mark II.
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: RGB Backlight and Rotary encoder

Post by MikeB »

I've downloaded 1.6.12 IDE, and I'll install that and see what is happening.
It may be a day or two as I'm tied up with life things at the moment.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: RGB Backlight and Rotary encoder

Post by MikeB »

In the meantime, try making sure this code is in the file before setup().

Code: Select all

void requestEvent( void ) ;

// function that executes whenever data is requested by master
// this function is registered as an event, see setup()
void requestEvent()
{
  Wire.write( EncoderData, 2 ) ; // respond with Data 2 bytes
}
Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

User avatar
OctavioS
Posts: 657
Joined: Sun Aug 17, 2014 11:54 pm
Country: Portugal
Location: Madeira

Re: RGB Backlight and Rotary encoder

Post by OctavioS »

Mike, the same error happens.
I see several setup()
what i did was replacing the final part of the code with that code you wrote above.
2x - Turnigy 9X with 9xtreme board;
2x - Turnigy 9XRpro ;
Frsky Taranis & Taranis +;
Horus x10s;
Horus x12s;
Radiomaster TX16S Max mark II.
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: RGB Backlight and Rotary encoder

Post by MikeB »

I've just found time to try 1.6.12 and it compiles fine, even with the original source file.

Please try compiling with the line:
Wire.onRequest(requestEvent); // register event
commented out (put "//" at the start of the line), and see if that compiles.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
OctavioS
Posts: 657
Joined: Sun Aug 17, 2014 11:54 pm
Country: Portugal
Location: Madeira

Re: RGB Backlight and Rotary encoder

Post by OctavioS »

Sem Título.png
I must be doing something wrong.
The .ino file is in a folder with the same name on the desktop, should it be in the libraries folder?
2x - Turnigy 9X with 9xtreme board;
2x - Turnigy 9XRpro ;
Frsky Taranis & Taranis +;
Horus x10s;
Horus x12s;
Radiomaster TX16S Max mark II.
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: RGB Backlight and Rotary encoder

Post by MikeB »

I meant change:
Wire.onRequest(requestEvent); // register event
to:
//Wire.onRequest(requestEvent); // register event

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
OctavioS
Posts: 657
Joined: Sun Aug 17, 2014 11:54 pm
Country: Portugal
Location: Madeira

Re: RGB Backlight and Rotary encoder

Post by OctavioS »

Sem Título.png
Option 1: im dumb and not getting it.
option 2: my pc is cursed.
2x - Turnigy 9X with 9xtreme board;
2x - Turnigy 9XRpro ;
Frsky Taranis & Taranis +;
Horus x10s;
Horus x12s;
Radiomaster TX16S Max mark II.
User avatar
OctavioS
Posts: 657
Joined: Sun Aug 17, 2014 11:54 pm
Country: Portugal
Location: Madeira

Re: RGB Backlight and Rotary encoder

Post by OctavioS »

Any guess why wont this file compile on my laptop?
I have windows 10 x64. Pretty anoying this subject?
2x - Turnigy 9X with 9xtreme board;
2x - Turnigy 9XRpro ;
Frsky Taranis & Taranis +;
Horus x10s;
Horus x12s;
Radiomaster TX16S Max mark II.
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: RGB Backlight and Rotary encoder

Post by MikeB »

I think you may have copied the function requestEvent() instead of moving it.
Please try compiling the attached .ino file.

I'm also using Win 10 64-bit.

Mike.
Attachments
I2Cencoder.zip
(674 Bytes) Downloaded 215 times
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
OctavioS
Posts: 657
Joined: Sun Aug 17, 2014 11:54 pm
Country: Portugal
Location: Madeira

octavios

Post by OctavioS »

I'm working right now. I'll let you know as soon as I can.
2x - Turnigy 9X with 9xtreme board;
2x - Turnigy 9XRpro ;
Frsky Taranis & Taranis +;
Horus x10s;
Horus x12s;
Radiomaster TX16S Max mark II.
User avatar
OctavioS
Posts: 657
Joined: Sun Aug 17, 2014 11:54 pm
Country: Portugal
Location: Madeira

Re: RGB Backlight and Rotary encoder

Post by OctavioS »

Mike everything went fine, thx for your time. now i can go to next step.
2x - Turnigy 9X with 9xtreme board;
2x - Turnigy 9XRpro ;
Frsky Taranis & Taranis +;
Horus x10s;
Horus x12s;
Radiomaster TX16S Max mark II.

Post Reply

Return to “9Xtreme upgrade board”