Recent Posts

Pages: [1] 2 3 ... 10
Français / Re: Serrure 12v
Last post by Atmosphire - Jun 21, 2018, 11:59 pm
Ha okay je viens de comprendre comme ça marche ! Mais il a pas moyen tous simplement de monter le 5v en 12v ? Sans passer par un module de relais ?
Hardware / Re: Fulmine brucia ethernet sh...
Last post by uwefed - Jun 21, 2018, 11:58 pm
Il controller ATmega328 sul arduino UNO é abbastanza robusto.

D' altra parte quando ci sono fulmini nelle vicinanze sia come scarica diretta, ma anche come influenza elettrostatica di grande cariche con variazioni del campo elettrico veloce possono fare molti danni.

Non credo che un UPS o uno stabilizzatore avrebbero cambiato granche.

Ciao Uwe
Displays / Re: How to parse a floating-po...
Last post by odometer - Jun 21, 2018, 11:57 pm
Of course it is overkill.   So what?

You read a sensor periodically.   Processing the f-p maths is not significant.
A Uno has got 31.5kB Flash available for your app.   You can afford the flash used for f-p.
I was thinking more in terms of replacing an "unsolved problem" (displaying a floating-point number) with a "solved problem" (displaying an integer).

We know that the OP has potentially an eight-digit display on which he (she?) is already able to display a two-digit integer. So now all OP has to do is press a third digit into service and light up a decimal point.
Project Guidance / Re: Can I use analogwrite insi...
Last post by Fabius_rex - Jun 21, 2018, 11:53 pm
Here some drawings from the High Energy Ignition (H.E.I) module from the injection. This little man gives to the Engine Control Unit PWM pulses for the RPM reference.

With this information de E.C.U does 2 things

Each time the square wave from the R pin of the module goes HIGH, the Fuel inyector Pin goes HIGH.
But for how long? that is calculated using the data available from the car sensors (temperature, pressure, airflow, rpm, speed, etc)

And also the E.C.U sends BACK to the H.E.I module another PWM signal to PIN E to advance or retard the ignition spark, wich MAY or MAY NOT be synced with the PWM pulses coming from the RPM

But RPM here is the daddy of al the other square waves, or PWM pulses.

Programming Questions / Re: CRC Help
Last post by el_supremo - Jun 21, 2018, 11:51 pm
The code on the webpage I linked works and calculates exactly the CRC required by the OP.

Programming Questions / Re: Split uint-32 to bytes
Last post by Coding Badly - Jun 21, 2018, 11:48 pm

My apologies.  The 1.8.3 compiler is generating amazingly bad code.  It is not even using the SWAP instruction to isolate the nibble.  That's unexpected and disappointing.

LTO generated this for an unconditional local jump...

Code: [Select]

 2ec: 20 97        sbiw r28, 0x00 ; 0
 2ee: a9 f2        breq .-86      ; 0x29a <main+0xfc>

...instead of a simple relative jump.

That's also disappointing.

This was a small improvement but there is still dead code and unnecessary looping (the bulk of the trouble remains)...

Code: [Select]

  uint8_t va = product>>24;
  uint8_t vc = product>>20&0x0F;
  PORTA = va;
  PORTC = vc;

Project Guidance / Re: Feasibility Question: Text...
Last post by el_supremo - Jun 21, 2018, 11:48 pm
The uSD cards themselves aren't 5V tolerant but the uSD reader/adapter boards usually are. But not always. You have to make sure.

Project Guidance / Re: Can I use analogwrite insi...
Last post by Fabius_rex - Jun 21, 2018, 11:48 pm
Sorry spanish language , PMS is when the piston reaches the top.

But that is the way the fuel injection works, applying a PWM puls to the injector as well as the ignition coil

That is the way it can control injector aperture as well as coil ignition timing, dwell, etc.

Do you have a better way to drive this circuit scenario? Please give, Im always open to a better way to make things

Let try to make it simpler.

Trying to control the speed of a CPU FAN using a PWM signal, and base the speed of the fan in a REICEIVER IR LED that is reading modulated pulses as well. If the IR input is HIGH 1ms your PWM Duty cycle will be for instance 40%. If the IR is high 2ms, the Dutycycle of the fan will be 80%. (just inventing figures)

So basically you will poll the IRsensor data, and map the value from the sensor to the desired PWM Dutycycle, right?

Now, think of it backwards. For each pulse amount of pulses per unit of time. For instance F= 1/T. I want to drive an IR led emitter "X" amount of time, and in between 2 pulses of the fan (1RPM).

How can I do that in a better way that of the one I´m trying to do and explain?
Programming Questions / Error 'expected unqualified-id...
Last post by mrborntolose - Jun 21, 2018, 11:44 pm
Hi everyone!
This is the first time I try to make an arduino library while learning cpp syntax.
What I'm basically trying to do is wrapping a function for gathering a value from a custom sensor into a library. This function should output a float.

The error rises when I try to compile the code, but I can't understand where I am wrong! Any help would be appreciated, thanks in advance.

Code: [Select]

#ifndef ECsensor
#define ECsensor

#include "Arduino.h"

class ECsensor
    ECsensor ();
    ECsensor (uint8_t data, int power);
    float getEC ();
    uint8_t data;
    int power;
    float EC;


where 'data' is an analog-pin id (A0~A15) and 'power' a digital IO pin.

Code: [Select]

#include "Arduino.h"
#include "ECsensor.h"

  //pinMode declarations

ECsensor:ECsensor(uint8_t data, int power){
  //variable declarations && ECsensor()

float ECsensor:getEC (){
  //main function
  //return EC

This is the error:
Code: [Select]

Arduino:1.8.4 (Windows 7), Board:"Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

In file included from sketch\ECsensor.cpp:2:0:

ECsensor.h:10: error: expected unqualified-id before ')' token

     ECsensor ();


ECsensor.h:11: error: expected ')' before 'data'

     ECsensor (uint8_t data, int power);


ECsensor.h:8: error: an anonymous struct cannot have function members



ECsensor.h:17: error: abstract declarator '<anonymous class>' used as declaration



ECsensor.cpp:4: error: expected id-expression before '(' token



ECsensor.cpp:9: error: expected unqualified-id before ':' token

 ECsensor:ECsensor(uint8_t data, int power){


ECsensor.cpp:14: error: expected unqualified-id before ':' token

 float ECsensor:getEC (){


exit status 1
expected unqualified-id before ')' token
Hardware / Re: Sensore di corrente INA219
Last post by uwefed - Jun 21, 2018, 11:42 pm
Ok, ora sappiamo che hai quella scheda.
Come l' hai collegata al MKR1200? che Sketch stai usando? Che indirizzo I2C hai usato? Hai messo resistenza pullup sul I2C? A che tensione l' hai collegato?

Ciao Uwe
Pages: [1] 2 3 ... 10