astrobeed:
?R:
quindi per i tiny non posso fare niente?Non capisco la tua domanda, per Tiny usa l'IDE standard con il relativo core e non ci sono problemi sia sotto Windows che sotto Linux.
boh, io se provo con l'IDE standard a compilare un codice dove uso la SoftwareSerial e qualche altra cosa selezionando come board un tiny mi viene l'errore scritto nel mio post precedente
mentre se lo compilo su linux va senza problemi (provato l'anno scorso personalmente e l'altro ieri con Leo)
ad esempio questo codice: (lasciate stare che non fa niente di logico e che è scritto male, è solo di prova)
#include <SoftwareSerial.h>
SoftwareSerial TinySerial(0,1);
void setup()
{
pinMode(0,INPUT);
pinMode(1,OUTPUT);
pinMode(2,INPUT);
pinMode(3,OUTPUT);
pinMode(4,INPUT);
TinySerial.begin(9600);
}
void loop()
{
Start:
for (byte er=0;er<50;er++)
{
unsigned int d=random();
tone(3, 500,d);
unsigned long time=millis();
while(millis()-time<d*1.30)
{
if(pulseIn(2, LOW) < 400)
{
if(IR_Receive()) goto Start;
}
}
}
noTone(3);
}
boolean IR_Receive()
{
noTone(3);
unsigned int d[12];
for(byte er=0;er<11;er++) d[er]=pulseIn(2, LOW);
for(byte er=0;er<11;er++)
{
if(d[er]>800)d[er] = 1;
else if(d[er]>500)d[er] = 0;
else return 0;
}
unsigned int r=0;
for(byte er=0;er<11;er++)if(d[er]==1) r|=(1<<er);
switch(r)
{
case 14:
{
TinySerial.write((char)r);
//other functions...
}
break;
case 15:
{
TinySerial.write((char)r);
//other functions...
}
break;
case 16:
{
TinySerial.write((char)r);
//other functions...
}
break;
case 17:
{
TinySerial.write((char)r);
//other functions...
}
break;
case 18:
{
TinySerial.write((char)r);
//other functions...
}
break;
case 5:
{
TinySerial.write((char)r);
//other functions...
}
break;
case 19:
{
TinySerial.write((char)r);
//other functions...
}
break;
default: return 0;
}
return 1;
}