ES9018 I2C controller

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
There is a delay in the main program, 1000ms after each key press.try to increase or descrease this.I use it with 150ms delay.
I also noticed that when the cfl lamp that I have in the room is cold the controller reacts very strange to remote signals or does not react at all.
First try the controller in the dark, if is still not working try to change that value for the delay.
 
I started my build of the CE Designs CE644 V1.3 board. Once I'm past the build and it works, then the code challenged sessions start...:eek:


Currently I use the CE Designs BIII shield with CE Designs/HiFiDuino code, BIII dual mono DAC. I also built a single BIII for a friend using the BIII shield/Arduino Uno. Both work great, going on 4 years for mine, two + for the single. An OLED display has been sitting here unused for too long.
 
Last edited:
I finished the CE644 v1.3 board. When I attempt to upload the v1.3 code, I get the error message

expected ';' before '}' token

SabreCE.ino: In function 'void setIRcode()':
SabreCE:289: error: expected `;' before '}' token


It happens in this block of code...

#pragma endregion DISPLAY_METHODS

#pragma region IR_METHODS

// sets the IR code
void setIRcode()
{
if (results.value == REPEAT)
{
IRcode = lastKey; // make IRcode the same as the last valid IR code
}
else
{
if (results.value >> 16 == PRE_DATA) // IR code received from a Apple remote
{
IRcode = (results.value >> 8) & 0xff;
IRcode = (IRcode << 1) & 0xff;
}
else // IR code received from another remote, so set to 0 to abort any further operation
{
IRcode = 0
}

The "}" in the last line of above is highlighted.


Thanks,
 
Last edited:
Ok, I'm guessing because I'm an old C and C++ programmer, but the last assignment statement is not terminated properly, it should be IRcode = 0;

But the braces also do not balance, and it's hard to tell because the code formatting is crap when displayed here - the html engine mangles the formatting. I just fixed the formatting and pasted it below, but on viewing it it's still mangled unless I add CODE tags to it - so I came up with this and the red braces and semicolon seems to make the code make sense, but I have not tested it. The fragment below that shows the same thing (no red bits) properly formatted.

#pragma endregion DISPLAY_METHODS

#pragma region IR_METHODS

// sets the IR code
void setIRcode()
{
if (results.value == REPEAT)
{
IRcode = lastKey; // make IRcode the same as the last valid IR code
} else
{
if (results.value >> 16 == PRE_DATA) // IR code received from a Apple remote
{
IRcode = (results.value >> 8) & 0xff;
IRcode = (IRcode << 1) & 0xff;
} else // IR code received from another remote, so set to 0 to abort any further operation
{
IRcode = 0;
}
}
}



Code:
#pragma endregion DISPLAY_METHODS

#pragma region IR_METHODS

// sets the IR code
void setIRcode() 
{
    if (results.value == REPEAT) 
    {
        IRcode = lastKey; // make IRcode the same as the last valid IR code
    } else 
    {
        if (results.value >> 16 == PRE_DATA) // IR code received from a Apple remote
        {
            IRcode = (results.value >> 8) & 0xff;
            IRcode = (IRcode << 1) & 0xff;
        } else // IR code received from another remote, so set to 0 to abort any further operation
        {
            IRcode = 0;
        }
    }
}
 
I finished the CE644 v1.3 board. When I attempt to upload the v1.3 code, I get the error message

expected ';' before '}' token

SabreCE.ino: In function 'void setIRcode()':
SabreCE:289: error: expected `;' before '}' token


It happens in this block of code...

#pragma endregion DISPLAY_METHODS

#pragma region IR_METHODS

// sets the IR code
void setIRcode()
{
if (results.value == REPEAT)
{
IRcode = lastKey; // make IRcode the same as the last valid IR code
}
else
{
if (results.value >> 16 == PRE_DATA) // IR code received from a Apple remote
{
IRcode = (results.value >> 8) & 0xff;
IRcode = (IRcode << 1) & 0xff;
}
else // IR code received from another remote, so set to 0 to abort any further operation
{
IRcode = 0
}

The "}" in the last line of above is highlighted.


Thanks,

Yeah, I ran into that as well. You just need to add a ; at the end of the line. This will probably be the least of your problems.
 
Ok, I'm guessing because I'm an old C and C++ programmer, but the last assignment statement is not terminated properly, it should be IRcode = 0;

Thank you! DUH! It was right there in front of me! This makes sense now....:eek:

One line was missing a ; on the end which threw a compiling error. I don't remember where this was.....



That part is fixed but there are more problems. I'm going to enjoy whats left of this Sunday without any more grief...lol
 
This is what I ended up with...

OLEDFourBit.cpp.o:(.data.bn1+0x0): multiple definition of `bn1'
CharacterOLED.cpp.o:(.data.bn1+0x0): first defined here
OLEDFourBit.cpp.o:(.data.bn2+0x0): multiple definition of `bn2'
CharacterOLED.cpp.o:(.data.bn2+0x0): first defined here
OLEDFourBit.cpp.o:(.data.bn3+0x0): multiple definition of `bn3'
CharacterOLED.cpp.o:(.data.bn3+0x0): first defined here

lol the code made its own unhappy faces.... : (
 
I was heavily involved with the CE328 code and I still have inches of notes and code laying around. I have two of the prototype BIII shields in use that required some external resistors on the circuit to make it work. Corpius offered to exchange them with later revisions of the shield but they worked so I kept them in service.

Thanks for the help! OK, I got it the code to compile. Per your older post..."The USB/serial connector will not work without a boot loader present." So I must do that next.

Another question, the default programmer is 'AVRISP mkII' in Arduino 1.0.1. I read with version 1.1 and 1.2 boards, when you program via ISP, you set programmer to 'Arduino as ISP.' Which is the correct Programmer setting to use with V1.3 CE644 board after you burn the boot loader?
 
Last edited:
I used "Arduino as ISP" to burn the boot loader. You will need the software extension for the ATmega644. You may need to do a little digging but you can find all instructions and links to the files necessary for burning the boot loader on CE-Designs website. After you burn the boot loader you can use usb to upload the sketch.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.