GithubHelp home page GithubHelp logo

pinguinoide / pinguino-libraries Goto Github PK

View Code? Open in Web Editor NEW
24.0 15.0 27.0 14.07 MB

Pinguino librairies, keywords and other useful files.

Python 0.01% C 99.76% C++ 0.02% Assembly 0.14% Batchfile 0.03% Shell 0.03%

pinguino-libraries's Introduction

pinguino-libraries

Pinguino librairies, examples, keywords and other useful files.

You can log an issue for a bug you've found or better :

  • Fork the repository.
  • Make the fix.
  • Submit a pull request.

pinguino-libraries's People

Contributors

fcwpinguino avatar kh90909 avatar mefhigoseth avatar rblanchot avatar yeisoncardona avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pinguino-libraries's Issues

18F4550 Fails on slave mode using example slave.pde

Hi.

I am working with the example slave.pde ( https://github.com/PinguinoIDE/pinguino-libraries/blob/master/examples/04.Communication/i2c/slave.pde ) and connecting a raspberry Model B ver.1 using level shifters to use I2C.

I2C lines come from raspberry (SDA:3 SCL:5) to level shifters and using pull up resistors 2.2k, so, the SDA and SCL lines go to RTC DS1307 and to PIC in SDA:RB0 / SCL:RB1.

The actual example has an address 0x2c for PIC in slave mode but from raspberry it responds with 0x16 and 0x1e simultaneously!!, doing "i2cdetect -y 0" in raspberry the led on RB7 goes to intermittent (blinking) and communication failed, however, PIC still respond with same adresss (0x16 and 0x1e), after that it is neccesary to turn off and turn on the pic to start or pressing the switch to change to programming mode bootloader.

In the code (slave.pde) you can read:

  for(i=0;i<6;i++)  // to show the slave is started waiting interrupts and commands
    {LA7=!LA7; delay(500);}

but it is in setup section not in the loop, besides only blink 2 times in the start.

Calling another adress or other device, then PIC hang up again.

After turn on the PIC i can call it and works fine

pi@Arbolito ~ $ i2cget -y 0 0x16 0x00 
0x01
pi@Arbolito ~ $ i2cget -y 0 0x16 0x01
0x02
pi@Arbolito ~ $ i2cget -y 0 0x16 0x02
0x03
pi@Arbolito ~ $ i2cget -y 0 0x16 0x55
0x56

calling to RTC..

pi@Arbolito ~ $ sudo hwclock -r
Fri 13 Feb 2015 06:52:55 PM VET  -0.496562 seconds


pi@Arbolito ~ $ sudo i2cdetect -y 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- 16 -- -- -- -- -- -- -- 1e --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

After this, then stop communication..

pi@Arbolito ~ $ i2cset -y 0 0x16 0x90
Error: Write failed

and so on

This is the diagram and connections in protoboard: http://goo.gl/ZpYFRq
GitHub Logo!
NOTES:
a) Using a board PinguinoVE got same results.
b) Changing PIC for another and another with bootloader 4.14 and 2.12 got same results
c) With pull up resistors or without got same results
d) Led on RB6 never turn on sending command 0x90 like example
e) All grounds are connected

x) Please excuse my english ;-)

Best Regards

@Visionario
Asdrubal R. Velasquez
Puerto Ordaz - Venezuela

send nul on serial fails silently

On X3 + Pinguino-Micro.. Printing nul character results in nothing.

char b;
b=0;
Serial2.printf("%c",b); // nothing
b=10;
Serial2.printf("%c",b); // works

toogle() function does not toogle in v13

Hi,

Using toogle() function makes the line go to HIGH state, but once at HIGH it does not invert the logic to LOW. So, an LED with toogle (i.e. the Blink example) will stay ON.

IR LIBRARY ERROR: 369: Undefined identifier 'T3_RUN_FROM_OSC'

Regis,
i have found an issue with the ir library. i am getting this error when compiling ERROR: 369: Undefined identifier 'T3_RUN_FROM_OSC'. this pde worked before i have tried on my other debian machine same error. i am using the irdimming.pde in the example folder , i am using pinguino ide 11

Explanation

Hi im new into this world of pinguino and i would appreciate if someone could explain me how exactly the library works i get the milis_init initialize the millis the millis() return the value of millis the interrupt increase the millis by 1 but the update dont get the idea of it,the only thing i need to do is replace the delay(ms) using only the millis library :( could someone explain this to me please T.T?

ks0108.c: SDCC says syntax error

SDCC : mcs51/z80/z180/r2k/r3ka/gbz80/tlcs90/ds390/TININative/ds400/hc08/s08/stm8 3.8.0 #10562 (Linux)
published under GNU General Public License (GPL)

2020-12-24 17:36:10.806011
######################################################################
/dvpt/pinguino/git-copy/pinguino-compilers/sources/sdcc/src/pic16/main.c:701 setting interrupt vector addresses 0xc00
In file included from /home/luzemario/.pinguino/v13/pinguino-libraries-master/p8/include/pinguino/libraries/ks0108.c:52,
                 from /home/luzemario/Pinguino/v13/source/define.h:6,
                 from /home/luzemario/Pinguino/v13/source/main.c:44:
/home/luzemario/.pinguino/v13/pinguino-libraries-master/p8/include/pinguino/libraries/printFormated.c:344:5: warning: "/*" within comment
/home/luzemario/.pinguino/v13/pinguino-libraries-master/p8/include/pinguino/libraries/printFormated.c:387:5: warning: "/*" within comment
/home/luzemario/.pinguino/v13/pinguino-libraries-master/p8/include/pinguino/libraries/printFormated.c:416:9: warning: "/*" within comment
/home/luzemario/.pinguino/v13/pinguino-libraries-master/p8/include/pinguino/libraries/printFormated.c:459:13: warning: "/*" within comment
/home/luzemario/.pinguino/v13/pinguino-libraries-master/p8/include/pinguino/libraries/printFormated.c:198: warning 85: in function pprinti unreferenced function argument : 'separator'
/home/luzemario/.pinguino/v13/pinguino-libraries-master/p8/include/pinguino/libraries/printFormated.c:500: warning 85: in function pprintfl unreferenced local variable : 'i'
/home/luzemario/.pinguino/v13/pinguino-libraries-master/p8/include/pinguino/libraries/printFormated.c:500: warning 85: in function pprintfl unreferenced local variable : 'rounding'
/home/luzemario/.pinguino/v13/pinguino-libraries-master/p8/include/pinguino/libraries/printFormated.c:500: warning 85: in function pprintfl unreferenced function argument : 'separator'
Processor: 18f4550
sdcc: Calling preprocessor...
sdcc: sdcpp -nostdinc -Wall -DPINGUINO4550 -D__CONNECTUSB__ -DBOARD=\"PINGUINO4550\" -DPROC=\"18f4550\" -DBOOT_VER=4 -I/home/luzemario/.pinguino/v13/pinguino-libraries-master/p8/include/pinguino/core -I/home/luzemario/.pinguino/v13/pinguino-libraries-master/p8/include/pinguino/libraries -I/home/luzemario/Pinguino/v13/examples/07.Display/GLCD -D__18f4550 -D__SDCC_PIC18F4550 -D__STACK_MODEL_SMALL -obj-ext=.o -D__SDCC_USE_NON_FREE -D__SDCC_ALL_CALLEE_SAVES -D__SDCC=3_5_5 -D__SDCC_VERSION_MAJOR=3 -D__SDCC_VERSION_MINOR=5 -D__SDCC_VERSION_PATCH=5 -DSDCC=355 -D__SDCC_REVISION=9410 -D__SDCC_pic16 -D__STDC_NO_COMPLEX__ -D__STDC_NO_THREADS__ -D__STDC_NO_ATOMICS__ -D__STDC_NO_VLA__ -isystem /home/luzemario/.pinguino/v13/pinguino-compilers/p8/bin/../share/sdcc/include/pic16 -isystem /dvpt/pinguino/git-copy/pinguino-compilers/linux64/p8/share/sdcc/include/pic16 -isystem /home/luzemario/.pinguino/v13/pinguino-compilers/p8/bin/../share/sdcc/include -isystem /dvpt/pinguino/git-copy/pinguino-compilers/linux64/p8/share/sdcc/include -isystem /home/luzemario/.pinguino/v13/pinguino-compilers/p8/bin/../share/sdcc/non-free/include/pic16 -isystem /dvpt/pinguino/git-copy/pinguino-compilers/linux64/p8/share/sdcc/non-free/include/pic16 -isystem /home/luzemario/.pinguino/v13/pinguino-compilers/p8/bin/../share/sdcc/non-free/include -isystem /dvpt/pinguino/git-copy/pinguino-compilers/linux64/p8/share/sdcc/non-free/include  /home/luzemario/Pinguino/v13/source/main.c 
sdcc: Generating code...
/home/luzemario/.pinguino/v13/pinguino-libraries-master/p8/include/pinguino/libraries/ks0108.c:137: syntax error: token -> 'u8' ; column 6
/home/luzemario/.pinguino/v13/pinguino-libraries-master/p8/include/pinguino/libraries/ks0108.c:139: error 20: Undefined identifier 'i'
/home/luzemario/.pinguino/v13/pinguino-libraries-master/p8/include/pinguino/libraries/ks0108.c:139: error 20: Undefined identifier 'i'
/home/luzemario/.pinguino/v13/pinguino-libraries-master/p8/include/pinguino/libraries/ks0108.c:138: error 20: Undefined identifier 'i'
/home/luzemario/.pinguino/v13/pinguino-libraries-master/p8/include/pinguino/libraries/ks0108.c:138: error 20: Undefined identifier 'i'
/home/luzemario/.pinguino/v13/pinguino-libraries-master/p8/include/pinguino/libraries/ks0108.c:138: error 20: Undefined identifier 'i'

No graphical LCD examples compile within v13

OLED

REGIS,
i know this is not in the library , but i found this from Marcus Fazzi and tried bit received an error

// Program for I2C communication with a 128x64 OLED Display (http://www.seeedstudio.com)
// Marcus Fazzi 2010

#define LED 13
#define I2C_address 0x3c // i2c address of Display

#include <libI2C.c>

//For working with strings strlen() function
// #include <string.h>

#include <data.c>

unsigned char fill_OLED = 0x55;
unsigned char fill_string1[13]="Pinguino OLED";
unsigned char fill_string2[11]="OLED 128x64";
unsigned char fill_string3[16]="0123456789ABCDEF";
unsigned char fill_string4[2]="SS";

//=======================
void sendcommand(unsigned char com)
{
short dt[2] = { 0x80, com }; //command mode
I2C_write(I2C_address, dt, 2);
I2C_STOP(); //stop transmitting
}

//===================================
void SendChar(unsigned char dat)
{
short dt[2] = { 0x40, dat }; //data mode
I2C_write(I2C_address, dt, 2);
I2C_STOP(); //stop transmitting
}

//===================================
void setXY(unsigned char row,unsigned char col)
{
sendcommand(0xb0 + row); //set page address
sendcommand(0x00 + (8 * col & 0x0f)); //set low col address
sendcommand(0x10 + ((8 * col >> 4) & 0x0f)); //set high col address
}

//==================================
void clear_display()
{
unsigned char i,k;
for(k=0;k<8;k++)
{
setXY(k,0);
{
for(i=0;i<128;i++) //clear all COL
{
SendChar(0);
}
}
}
}

//==================================
void printChar(unsigned char ascii)
{
unsigned char i;
for(i=0;i<8;i++)
{
SendChar(myFont[ascii-0x20][i]);
}
}

//==================================
void sendStr(unsigned char _string, unsigned char len)
{
unsigned char i, j;
//setXY(0,0);
for(i=0;i<len;i++)
{
for(j=0;j<8;j++)
{
SendChar(myFont[*string-0x20][j]);
//SendChar(_string);
delay(10);
}
*string++;
}
}

//=================================
void init_OLED(void)
{
sendcommand(0xae); //display off
delay(50);
// sendcommand(0xa0); //seg re-map 0->127(default)
// sendcommand(0xa1); //seg re-map 127->0
// sendcommand(0xc8);
// delay(1000);
sendcommand(0xaf); //display on
delay(50);
}

void setup()
{
delay(500);
init_I2C();
//SSPADD=19; //Slow mode

init_OLED();
delay(10);
clear_display();
delay(50);

pinMode(LED, OUTPUT);

}

//========================
void loop()
{
short i;

clear_display();
delay(50);

sendcommand(0x20); //Set Memory Addressing Mode
sendcommand(0x02); //Set Memory Addressing Mode ab Page addressing mode(RESET)

sendcommand(0xa6); //Set Normal Display (default)
setXY(3,2);
sendStr(fill_string1, 13);
setXY(4,3);
sendStr(fill_string2, 11);

delay(2000);
sendcommand(0xa7); //Set Inverse Display
delay(2000);

clear_display();
delay(50);

setXY(0,0);
sendcommand(0xa6); //Set Normal Display

sendcommand(0xae); //display off
sendcommand(0x20); //Set Memory Addressing Mode
sendcommand(0x00); //Set Memory Addressing Mode ab Horizontal addressing mode

for(i=0;i<128*8;i++) //write a 128x64 picture
{
SendChar(logo[i]);
}

sendcommand(0xaf); //display on
delay(2000);
sendcommand(0xa7); //Set Inverse Display
delay(2000);

while(1)
{
//sendcommand(0xa6); Set Normal Display
sendcommand(0x29); //Vertical and Horizontal Scroll Setup
sendcommand(0x00); //dummy byte
sendcommand(0x00); //define page0 as startpage address
sendcommand(0x00); //set time interval between each scroll ste as 6 frames
sendcommand(0x07); //define page7 as endpage address
sendcommand(0x01); //set vertical scrolling offset as 1 row
sendcommand(0x2f); //active scrolling
delay(3000);
};

}
OUT] ERROR: 5: No such file or directory

define I2C_address 0x3c

define.c

define I2C_address 0x3c

#define LED 13
#include <data.c>
#include <libI2C.c>

include <delayms.c>

include <digitalp.c>

include <typedef.h>

user.c

unsigned char fill_OLED = 0x55;
unsigned char fill_string1[13]="Pinguino OLED";
unsigned char fill_string2[11]="OLED 128x64";
unsigned char fill_string3[16]="0123456789ABCDEF";
unsigned char fill_string4[2]="SS";

void sendcommand(unsigned char com)
{
short dt[2] = { 0x80, com };
I2C_write(I2C_address, dt, 2);
I2C_STOP();
}

void SendChar(unsigned char dat)
{
short dt[2] = { 0x40, dat };
I2C_write(I2C_address, dt, 2);
I2C_STOP();
}

void setXY(unsigned char row,unsigned char col)
{
sendcommand(0xb0 + row);
sendcommand(0x00 + (8 * col & 0x0f));
sendcommand(0x10 + ((8 * col >> 4) & 0x0f));
}

void clear_display()
{
unsigned char i,k;
for(k=0;k<8;k++)
{
setXY(k,0);
{
for(i=0;i<128;i++)
{
SendChar(0);
}
}
}
}

void printChar(unsigned char ascii)
{
unsigned char i;
for(i=0;i<8;i++)
{
SendChar(myFont[ascii-0x20][i]);
}
}

void sendStr(unsigned char *string, unsigned char len)
{
unsigned char i, j;

for(i=0;i<len;i++)
{
for(j=0;j<8;j++)
{
SendChar(myFont[*string-0x20][j]);

  Delayms(10);
}
*string++;

}
}

void init_OLED(void)
{
sendcommand(0xae);
Delayms(50);

sendcommand(0xaf);
Delayms(50);
}

void setup()
{
Delayms(500);
init_I2C();

init_OLED();
Delayms(10);
clear_display();
Delayms(50);

pinmode(LED, OUTPUT);

}

void loop()
{
short i;

clear_display();
Delayms(50);

sendcommand(0x20);
sendcommand(0x02);

sendcommand(0xa6);
setXY(3,2);
sendStr(fill_string1, 13);
setXY(4,3);
sendStr(fill_string2, 11);

Delayms(2000);
sendcommand(0xa7);
Delayms(2000);

clear_display();
Delayms(50);

setXY(0,0);
sendcommand(0xa6);

sendcommand(0xae);
sendcommand(0x20);
sendcommand(0x00);

for(i=0;i<128*8;i++)
{
SendChar(logo[i]);
}

sendcommand(0xaf);
Delayms(2000);
sendcommand(0xa7);
Delayms(2000);

while(1)
{

sendcommand(0x29);  
sendcommand(0x00);  
sendcommand(0x00);  
sendcommand(0x00);  
sendcommand(0x07);  
sendcommand(0x01);  
sendcommand(0x2f);  
Delayms(3000);

};

}

thanks
fred

IR LIBRARY ERROR: 369: Undefined identifier 'T3_RUN_FROM_OSC'

Regis,
i have found an issue with the ir library. i am getting this error when compiling ERROR: 369: Undefined identifier 'T3_RUN_FROM_OSC'. this pde worked before i have tried on my other debian machine same error. i am using the irdimming.pde in the example folder , i am using pinguino ide 11

[DEBUG] Ending 'compile'
[DEBUG] Time spent for 'verify': 0.29 s
[DEBUG] Ending 'verify'
[OUT] ERROR: 369: Undefined identifier 'T3_RUN_FROM_OSC'
[OUT]

/dvpt/pinguino/git-copy/pinguino-compilers/sources/sdcc/src/pic16/main.c:701 setting interrupt vector addresses 0xc00
/usr/share/pinguino-11/p8/include/pinguino/libraries/IRremote.c:369: error 20: Undefined identifier 'T3_RUN_FROM_OSC'
/usr/share/pinguino-11/p8/include/pinguino/libraries/IRremote.c:1021: warning 116: right shifting more than size of object changed to zero
/usr/share/pinguino-11/p8/include/pinguino/libraries/IRremote.c:1135: warning 212: support for large long long literals is incomplete
/usr/share/pinguino-11/p8/include/pinguino/libraries/IRremote.c:1135: warning 212: support for large long long literals is incomplete
Processor: 18f4550
sdcc: Calling preprocessor...
sdcc: sdcpp -nostdinc -Wall -DPINGUINO4550 -Dboot4 -DBOARD="PINGUINO4550" -DPROC="18f4550" -DBOOT_VER=4 -I/usr/share/pinguino-11/p8/include/pinguino/core -I/usr/share/pinguino-11/p8/include/pinguino/libraries -I/home/fred/.pinguino/examples/06.Sensors/IR_remote -D__18f4550 -D__SDCC_PIC18F4550 -D__STACK_MODEL_SMALL -obj-ext=.o -D__SDCC_USE_NON_FREE -D__SDCC_ALL_CALLEE_SAVES -D__SDCC=3_5_0 -D__SDCC_REVISION=9248 -D__SDCC_pic16 -D__STDC_NO_COMPLEX__ -D__STDC_NO_THREADS__ -D__STDC_NO_ATOMICS__ -D__STDC_NO_VLA__ -isystem /usr/bin/../share/sdcc/include/pic16 -isystem /dvpt/pinguino/git-copy/pinguino-compilers/linux64/p8/share/sdcc/include/pic16 -isystem /usr/bin/../share/sdcc/include -isystem /dvpt/pinguino/git-copy/pinguino-compilers/linux64/p8/share/sdcc/include -isystem /usr/bin/../share/sdcc/non-free/include/pic16 -isystem /dvpt/pinguino/git-copy/pinguino-compilers/linux64/p8/share/sdcc/non-free/include/pic16 -isystem /usr/bin/../share/sdcc/non-free/include -isystem /dvpt/pinguino/git-copy/pinguino-compilers/linux64/p8/share/sdcc/non-free/include /home/fred/.pinguino/source/main.c
sdcc: Generating code...

lcd.printf - Too many parameters

Compiling HelloWorld.pde for Pinguino PIC18G45K50, I get an error on line:
lcd.printf("Uptime %02d:%02d:%02d", h,m,s);

  • Too many parameters
    In lcdlib.c I can see two #ifdef LCDPRINT ... #endif
    If I remove the # lines or change to #ifndef, I can compile and run the program.
    The relevant line in the pdl file looks OK...
    lcd.printf lcd_printf#include <lcdlib.c>#define LCDPRINTF
    It is the last instruction in the file but moving it makes no difference.
    So I do not know why the #define is not working.
    I am using IDE version is 11.0-beta.3 on Windows 8, installed by a script I downloaded today.

OnChangePin4to7 bug

Hello,

Probably i have found a bug in interrup.c in p8.
OnChangePin4to7 function will be updated INTCON2bits.INTEDG2 at line 1684.
This can cause improper behavior of OnChangePin2.
Also the "config" parameter in definition of OnChangePin4to7 is irrelevant.

Setting the TRISB is the another problem.
Just one pin will be configured as input but the name suggests all 4 will be.

If I want to use all 4 pins, i have to do something like this:
pinMode(PIN1, INPUT);
pinMode(PIN2, INPUT);
pinMode(PIN3, INPUT);
OnChangePin4to7(onPIN,PIN4,0);
insted of this: OnChangePin4to7(onPIN);
Of course in this case if I want to use ex: PIN2 as output, need to configure the pin as output:
pinMode(PIN2, OUTPUT);

Cnsider this modified function:

//void OnChangePin4to7(callback func, u8 pin, u8 config)
void OnChangePin4to7(callback func)
{
if (intUsed[INT_RB] == INT_NOT_USED)
{
intUsed[INT_RB] = INT_USED;
intFunction[INT_RB] = func;
INTCON2bits.INTEDG2 = config;
// TRISB |= (1 << pin); // pin as an INPUT
TRISB |= 0xF0; // RB7:RB4 (pin7:pin4) are INPUT
INTCON2bits.RBIP = INT_LOW_PRIORITY;
INTCONbits.RBIE = INT_ENABLE;
INTCONbits.RBIF = 0;
}
#ifdef DEBUG
else
{
debug("Error : interrupt RB is already used !");
}
#endif
}

Thanks.
Peter

lcdi2c with ds18b20 sdcc and x8c issues

/*-----------------------------------------------------------------------
Pinguino example to read ds18b20 1wire temperature sensor
Result is sent on usb-serial bus and can be read with index.php
author Régis Blanchot
first release 14/09/2010
last update 10/06/2011
IDE Pinguino > b9.5
-----------------------------------------------------------------------
DS18B20 wiring
-----------------------------------------------------------------------
pin 1: GND
pin 2: DQ (Data in/out) must be connected to the PIC
pin 3: VDD (+5V)
NB : 1-wire bus (DQ line) must have 4K7 pull-up resistor (connected to +5V)
-----------------------------------------------------------------------
Data's are sent to /dev/ttyACM0
Make sure you have persmission on it : sudo chmod 777 /dev/ttyACM0
Maybe you will have to add your user name to the dialup group
----------------------------------------------------------------------*/

#define ONEWIREBUS 14

void setup()
{
lcdi2c.init(16, 2, 0x27,4,2,1,0,3);
lcdi2c.backlight(); // turns backlight on
lcdi2c.clear(); // clear screen
lcdi2c.home();

}
void loop()
{

TEMPERATURE t;
       
       DS18x20.readFahrenheit(ONEWIREBUS, SKIPROM, &t);
       lcdi2c.setCursor(0,1);          
       lcdi2c.printf("%d.%d degF\r\n", t.integer, t.fraction);
        
	

      
      
                
delay(1000);

}`
regis,
this pde compiles in both sdcc & x8c the pde works in sdcc with data but the display will not light
in x8c the display lights but no data is displayed.

TONE NOT WORKING

regis
I have been using the tone function in my pde and it has been work since the recent updates . I get the same result in windows and Linux I have tried different pins same result.
Tone(11,650,1000);

Thank you
Fred

I2C1 and I2C2

When I use commands from file I2C1, I2C2, PI2C1 or PI2C2 .pdl32 (the same commands), it use commands from file PI2C1 or PI2C2 .pdl32, but files pinguinoi2c1.c and pinguinoi2c2.c aren't exist. Please fix it. Thank You.

IR library with IDE 8-22-14

regis
with the ir library using the 47j and 26j i cannot compile but with the 4550 ansd 2550 they work fine i just have to add an extra curly brace at the end of the PDE
/*

  • DecodeRemote: demonstrates decoding IR codes from a remote control
  • An IR detector/demodulator must be connected to the input IRSENSOR.
  • Version 0.1 March, 2014
  • Author : Regis Blanchot
    */

define IRSENSOR 24 // pin 0, can be any digital pin

char brand[][10] = {"UNKNOWN", "NEC", "SONY", "RC5", "RC6", "DISH", "SHARP", "PANASONIC", "JVC", "SANYO", "MITSUBISHI"};

decode_results results; // Results returned from the decoder

void setup()
{
IRremote.enableIRIn(IRSENSOR); // Start the receiver
IRremote.blink(true); // Built-in led will blink at reception
}

void loop()
{
if (IRremote.decode(&results)==DECODED)
{
if (results.decode_type>10)
results.decode_type = 0;

CDC.println("Decoded ");

CDC.printNumber(results.value, HEX);
CDC.println(" (type ");
CDC.println(brand[results.decode_type]);
CDC.println(")\r\n");

/// or

//CDC.printf("Decoded %ld (type %s)\r\n", results.value, brand[results.decode_type]);

IRremote.resume(); // Ready to receive the next value
}
}

[/php]
/dvpt/pinguino/git-copy/pinguino-compilers/sources/sdcc/src/pic16/main.c:701 setting interrupt vector addresses 0xc00
/usr/share/pinguino-11/p8/include/pinguino/core/oscillator.c:200: error 20: Undefined identifier '__CONFIG1H'
/usr/share/pinguino-11/p8/include/pinguino/core/oscillator.c:200: error 20: Undefined identifier '__CONFIG1H'
/usr/share/pinguino-11/p8/include/pinguino/libraries/IRremote.c:1021: warning 116: right shifting more than size of object changed to zero
Processor: 18f26j50
sdcc: Calling preprocessor...
sdcc: Generating code...
/home/fred/.pinguino/source/main.c:95: syntax error: token -> 'void' ; column 8
/home/fred/.pinguino/source/main.c:160: error 20: Undefined identifier 'pll_startup_counter'

Interrupts Compiling

File /examples/08.Interrupt/P32-Interrupt-Timer1.pde cannot be compiled on all 32bit PICs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.