Show Posts
Pages: [1] 2 3 ... 13
1  Development / Other Software Development / Re: Optimised libraries for ATtiny on: April 16, 2013, 02:51:52 am
Libraries update on 2013/04/15.
 
2  International / Français / Re: Projet : IRTiny_Cat , Question !!! on: April 09, 2013, 06:43:38 am
Bonjour à toi,

J'ai écrit l'année dernière un ensemble de librairies optimisées pour les ATtiny. Je l'avais initialement posté ici mais les membres de ce forum m'ont tellement gonflé que j'ai traduit le post pour le publier uniquement sur le site anglophone.

La librairie IR décode le RC5 avec une fiabilité parfaite et ceci avec une empreinte mémoire minimale. Si tu as des problèmes avec l'anglais dis le moi je te traduirai la partie IR.

Voici le lien : http://arduino.cc/forum/index.php/topic,118794.0.html

Je te reproduis ici la partie IR :

ATTENTION : TinyIRrc5.h utilise TinyIrqHandler.h que tu dois aussi inclure dans ton projet.

_______________________________________________________________________________________________________


The provided example run on 16 MHz clock ATtiny45 (internal oscillator).


TinyIrqHandler.h

Full management of PCINT0 . Only one function to install your interrupts routines. Nothing else to handle.

IRQvecteur(byte irq, void (*adresse)())

example:

Code:
void MyPin1Routine()
{
   // your code here
}

void MyPin2Routine()
{
   // your code here
}

void MyPin3Routine()
{
   // your code here
}

etc...

void setup
{
   IRQvecteur(1, MyPin1Routine);
   IRQvecteur(2, MyPin2Routine);
   IRQvecteur(3, MyPin3Routine);
}

The library saves the value of micros() at the start of interrupt in the data IRQmicros. I's interesting to enable interrupts at the start or inside your routine by the Arduino's function interrupts(), but if you have to use the value IRQmicros you have to save it before enable interrupts to ensure the value doesn't change because of another interrupt. The provided libraries TinyIRrc5 & TinySerialPlus are always doing this to let the timer's routine execute as soon as possible in order to keep a good synchro on serial transmit.


TinyIRrc5.h

Infrared receive of RC5 codes under interrupts. This library contains 2 functions and one flag data.

IRdemarre(pin number)
int IRdecode()


The repeatbit of RC5 protocole is automatically managed.  If the key is a repeat then the high bit of the return is set if not this bit is clear.

Variable IRok indicate an available key.

example:

Code:
IRdemarre(1);

byte car;
 
   // Avec suppression de la répétition
   for (;;)
   {
      if (IRok)
      {
        car = IRdecode();
        if (car < 0x800)     // Test for no repeat key
          {
          switch(car)
{
 case 0x41:
    // your code
               break;
          etc..

   // Avec répétition
   for (;;)
   {
      if (IRok)
      {
        car = IRdecode() & 0x7FF;    // suppress the repeat bit
        switch(car)
{
 case 0x41:
    // your code
                break;
          etc..


Voici également le lien pour télécharger le zip avec les librairies et exemple : http://balbarie.com/arduino/TinyLibrariesSet.zip

Bon courage...
 
3  Community / Website and Forum / Re: Moderation's moderator... on: September 05, 2012, 06:49:10 am
You don't understand... The moderator don't let me time to delete the other posts. Before I can do this I receive this imperative message.

Now I have to retype the entire original message. While working receiving this moderator message cannot be a good news...

JLB
4  Community / Website and Forum / Re: Moderation's moderator... on: September 05, 2012, 06:17:58 am
Until this day my post was unique.

Today I try to post it in a more relevant topic. I would keep the original message only for minutes to make copy/paste before delete it.

After a new post I found a topic more relevant and copy also in this topic and then delete the other posts. But before I have the time to do this (while working and responding phone's calls) I received from moderator an imperative message.

Can you understand my anger ?

JLB

5  Community / Website and Forum / Moderation's moderator... on: September 05, 2012, 05:57:08 am
Nike Gammon send me an email and don't permit reply. So I post my response here.

He wrote :
Quote
You posted the exact same message about 4 times. Haven't you heard how annoying cross-posting is? I deleted all of them.

Now, try again. Post in ONE place. Or be banned.

- Moderator


Hey don't be afraid...

It's a rough way to contact a new member for the first time !

I'm french and not yet accustomed of your ultra right meaning and your full lack of empathy.

Perhaps you can be more cool for a first contact. I'm not a criminal guy.

Instead you could help me to post my question in the most relevant topic and delete all my posts except the one in the relevant topic.

Your manner seems too military in this space created in the spirit of Arduino's project (created in Europe by very cool guys).

Perhaps you get a good trip when you banish a member and you are always watching for opportunity to do this.

JLB

6  International / Le bar / Re: [AIDE] commande chez sureelectronics on: August 26, 2012, 04:49:19 am
En même temps PayPal couvre les achats jusqu'à 200 Euros.

J'ai déja eu un litige avec un vendeur et j'ai fait intervenir PayPal. Il a suffit que PayPAl lui envoie un mail d'intimidation pour que le vendeur reprennent son objet et me rembourse intégralement y compris les frais de port pour lui retourner son objet.

Je n'ai jamais eu d'autre problèmes où j'ai du faire intervenir PayPal car ils se sont réglés à l'amiable avec le vendeur.

Je pense que les vendeurs ne veulent pas risquer de perdre leur compte PayPal et rater ainsi de nombreuses ventes.

Le piratage de compte PayPal ne peut pas réellement exister car vous pouvez voir sur votre compte ce qui a été acheté, à qui cela a été acheté et où cela a été livré.

Quand au piratage de carte bancaire il n'a pas besoin de PayPal pour exister et je doute fort que cette société mondiale s'amuse à cela.

Donc refuser PayPal c'est se refuser un max de commodités.

JLB
7  International / Le bar / Re: [AIDE] commande chez sureelectronics on: August 24, 2012, 11:50:40 am
Non.

Piratage de compte ? fallait pas laisser trainer ton mot de passe...

8  Development / Other Software Development / Re: Optimised libraries for ATtiny on: August 24, 2012, 11:45:18 am
Last update today.

Minor modifications inside the code in order to save some bytes of Flash...

Some changes in the little user's guide provided (in the first post).

RXget() musn't be called if not RXcount !

JLB
9  Development / Other Software Development / Re: Looking for a Special Delay Library on: August 24, 2012, 04:59:34 am
I think the best way to implement a background melody player is to set the timer interrupt for the minimal duration being used by a melody.

The interrupt routine can play a table with frequency and duration of each note (don't forget the pause).

Using this method the normal code of your application can execute without any care about the player.

JLB

PS : You have to enable interrupts at the start of your interrupt routine to avoid disfunctionnement on other interrupts routines.
10  International / Le bar / Re: [AIDE] commande chez sureelectronics on: August 23, 2012, 12:42:51 pm
Avec Paypal ou avec le vendeur ?
11  International / Le bar / Re: [AIDE] commande chez sureelectronics on: August 22, 2012, 10:19:16 am
Perso j'utilise PayPal depuis des années sans le moindre souci et je trouve ce moyen de paiment très sur et très efficace.

JLB
12  Development / Other Software Development / Re: Looking for a Special Delay Library on: August 22, 2012, 03:37:06 am
You can do that by one or several counters decrements by a timer interrupts.

Here the code to initialize and handle the interrupt :

Code:
volatile unsigned long myCounter = 0;

void setup()
{
  TCCR1B = (TCCR1B & ~_BV(WGM13)) | _BV(WGM12);                  // Set CTC mode (Clear Timer on Compare Match)
  TCCR1A = TCCR1A & ~(_BV(WGM11) | _BV(WGM10));                  // ...
  TCCR1B = (TCCR1B & ~(_BV(CS12) | _BV(CS11))) | _BV(CS10);      // No prescaler
  OCR1A = 160;                                                   // Set the compare register (16e6 Hz / 100000 Hz = 160) for 10 uS
  TIMSK1 |= _BV(OCIE1A);                                         // Enable interrupt when TCNT1 == OCR1A
}

ISR(TIMER1_COMPA_vect)
{
   if (myCounter)
   {
      myCounter--;
   }
}

Then in your loop you can initialize the counter(s) to execute or not execute parts of code :

Code:
void loop()
{
    // code always execute
    // ...
    // ...
    
    if (!myCounter)
    {
        // code execute only each 2 milliseconds
        // ...
        // ...
        myCounter = 200 // value for 2 milliseconds
    }
    
    // code always execute
    // ...
    // ...
    
}

JLB
13  Development / Other Software Development / Re: [MOD] Arduino Enhanced Release 1.0.1 for Windows (installer, drivers, etc) on: August 20, 2012, 06:51:21 am
Sorry I misunderstand the title of the post.

It's not an enhanced IDE... It's only a windows intaller...

No news in the IDE itself.

JLB
14  Development / Other Software Development / Re: [MOD] Arduino Enhanced Release 1.0.1 for Windows (installer, drivers, etc) on: August 20, 2012, 05:10:36 am
Quote
Hello, this is a tweaked Arduino IDE 1.0.1, hope you enjoy it!

Can you provide a little summary of the enhanced functions ?

Screen captures are not so explicit for me.

JLB
15  Development / Other Software Development / Re: Optimised libraries for ATtiny on: August 18, 2012, 12:44:30 pm
Don't forget to download the latest version.

JLB
Pages: [1] 2 3 ... 13