Recent Posts

Pages: [1] 2 3 ... 10
1
Generale / Re: salve riprogrammare cip
Last post by uwefed - Today at 11:52 am
Siamo sicuri che quel integrato nascosto sotto quella goccia di laca nera non é programmabile solo 1 volta (ha um PROM al posto del EEprom/Flash)?

Se sei un veggente ha senso proseguire. Visto che ce lo chiedi a noi non lo sei percui lascia stare.
è lodevole voler riutilizzare delle parti elettroniche ma c'é un limite che blocca. La non conoscenza del perzzo é uno di questi limiti.

Ciao Uwe
2
Generale / Re: easy Grow Box control - co...
Last post by RobertoBochet - Today at 11:50 am
Vorrei intromettermi con un consiglio, se fai qualche ricerca sia sul forum che su google di piccoli sistemi isolati, acquari, serre, stanze noterai che è molto frequente l'utilizzo di schermi TFT touch che sostituiscono gli usuali schermi a due righe, costano un pochino di più ma permettono un interazione diretta con una GUI, che garantisce una consultazione delle letture piu rapida (e precisa), ed elimina ogni necessità di pulsanti aggiuntivi, che in caso di upgrade possono riservare problemi di installazione.
3
Arduino Due / Re: Arduino Due - How to imple...
Last post by spank - Today at 11:49 am
Forgot to include the function that sets up the interrupt. This may or may not be relevant.

Code: [Select]
void createTimerInterrupt(Tc* tc, uint32_t channel, IRQn_Type irq, uint32_t frequency)
{
  pmc_set_writeprotect(false);
  pmc_enable_periph_clk((uint32_t) irq);
  TC_Configure(tc, channel, TC_CMR_WAVE | TC_CMR_WAVSEL_UP_RC | TC_CMR_TCCLKS_TIMER_CLOCK4);
  uint32_t rc = (VARIANT_MCK / 128) / frequency; // 128 because we selected TIMER_CLOCK4 above
  TC_SetRA(tc, channel, rc/2); // 50% high, 50% low
  TC_SetRC(tc, channel, rc);
  TC_Start(tc, channel);
  tc->TC_CHANNEL[channel].TC_IER = TC_IER_CPCS;
  tc->TC_CHANNEL[channel].TC_IDR = ~TC_IER_CPCS;
  NVIC_EnableIRQ(irq);
}
4
Programming Questions / Re: matrix transpose error whe...
Last post by AWOL - Today at 11:48 am
Did you have a question?
You realise it's quite dangerous to assume an "int" and "float" are the same size?
5
Français / Re: Pompe à eau d'aquarium ave...
Last post by bricoleau - Today at 11:47 am
Bonjour

Attention : une telle pompe d'aquarium a une puissance de relevage très faible.
Par exemple, si ta réserve d'eau se trouve au niveau du sol, et que ta plante est à 1m de hauteur, cela ne fonctionnera pas.
Commence déjà par faire des tests hors arduino pour voir si la circulation d'eau que tu veux piloter est bien fonctionnelle.
Il peut être plus adapté d'utiliser une petite pompe 12VDC d'équipement caravane.

Dans tous les cas, je te conseille de prévoir un capteur de niveau dans ta réserve, pour éviter la marche à sec de la pompe.
6
Software / Re: Programar servo con pulsad...
Last post by _jose_ - Today at 11:46 am
Hola! estamos haciendo un trabajo de recerca y necesitamos que al apretar un pulsador, el servo se mueva 90 grados y se mantenga unos 10 segundos y luego baje por su cuenta.
Hemos conseguido que haga el movimiento al pulsarlo pero automaticamente al dejar de pulsar retorna a la posición inicial.
Si alguien nos pudiera ayudar, os estaríamos muy agradecidas! ;)   :smiley-lol:

si no poneis el codigo que estais usando y un esquema o explicacion de como esta conectado va a ser dificil saber que esta fallando,aunque si comentas que el servo funciona,seguramente sera del codigo.si no sabeis como postar el codigo ,echarle un ojo a las normas del foro,solo os llevara un par de minutos.
7
Arduino Due / Arduino Due - How to implement...
Last post by spank - Today at 11:45 am
I am trying to write a simple operating system to run on my Arduino Due. The basic idea is simple: I have a timer interrupt that periodically invokes the scheduler to select a new process to run. It's not much, but I have to start somewhere.

My program is successfully jumping to the interrupt handler, which is good. For reference this is the code I'm using:

Code: [Select]
void TC3_Handler()
{
  TC_GetStatus(TC1, 0);  // Accept the interrupt

  // The scheduler would invoke a new process here <--

  return;
}

void setup()
{
  // ...

  createTimerInterrupt(TC1, 0, TC3_IRQn, 1);  // Enable the timer interrupt with a frequency of 1 Hz

  // ...
}


The problem is that if I pass control to a new process by invoking the scheduler, the interrupt handler might not return. This is because there's no guarantee the new process will complete before the next interrupt.

But forcibly ejecting from the handler like this seems to create problems. For example, certain functions such as delay() cause the system to freeze after the first interrupt is handled -- it's as if the system timer is disabled while handling the interrupt and doesn't get turned back on unless the handler returns. This makes me suspect there's a behind-the-scenes wrapper function that calls the handler, though I could be wrong.

I am also concerned that there are consequences associated with stack management, since the return address is never popped. (Also while we're on the subject, how is there a stack if there isn't an operating system yet? Is it statically allocated by the compiler?)

I hope I've made all of this clear. Bottom line: how can I implement multitasking in my operating system? I appreciate any help or possible alternatives.
8
Project Guidance / Re: Multiple Servo Sequences
Last post by AWOL - Today at 11:44 am
Just about any state machine tutorial will point you in the right direction.
This is a good place to start.
10
Software / Programar servo con pulsador
Last post by LaiaIrene - Today at 11:42 am
Hola! estamos haciendo un trabajo de recerca y necesitamos que al apretar un pulsador, el servo se mueva 90 grados y se mantenga unos 10 segundos y luego baje por su cuenta.
Hemos conseguido que haga el movimiento al pulsarlo pero automaticamente al dejar de pulsar retorna a la posición inicial.
Si alguien nos pudiera ayudar, os estaríamos muy agradecidas! ;)   :smiley-lol:
Pages: [1] 2 3 ... 10