Recent Posts

Pages: [1] 2 3 ... 10
1
Thanks guys for your responding, now do you suggest another method to do that instead of Arduino?
2
Software / Re: termostato arduino problem...
Last post by ikebanat - Today at 07:45 pm
@docdoc ti ha trovato tre errori e ti ha dato le soluzioni.
Tu posti un codice dove si sono di nuovo gli stessi 3 errori
Ho solo pubblicato il codice come mi è stato chiesto non appena posso testo la soluzione di docdoc
3
If you don't disable timer0, your timer will be interrupted every millisecond or so, which gives you about 40/60 odds of an incorrect value.
4
Much easier just to declare as follows:

Code: [Select]
char photoTitle[12] = "IMAGE00.JPG";

No need to declare two instances of the same string in order to copy one instance to the other.
5
Software / Re: Attesa tempo scrittura fla...
Last post by thedrifter - Today at 07:44 pm
Ciao a tutti,
mi fate morire con quella DUE  :D , è sfuggito a tutti, un po' perchè poco usata, un po' perchè l'ho scritto in minuscolo e non ci si fa caso...

Rispondo a DOCDOC, è tutto su un display, faccio presto a vedere... Cancello la flash, aspetto 2 minuti, scrivo il valore, tutto ok, lo vado a rileggere è sempre quello scritto (mettiamo decimale 995); cambio il valore a 980, lo vado a scrivere, quando lo rileggo trovo 960, se riscrivo 980, rimane sempre 960; cambio valore, vado a scrivere 970, se rileggo rimane sempre 960.
Escludo errori matematici sulla scrittura, perchè se cancello la flash, qualsiasi valore scrivo, rimane perfettamente...

UWEFED, si, posso cambiare e utilizzare una EEPROM, anche se leggendo non ho capito granchè le differenze; però tutte le volte che scelgo qualcosa, sbaglio sempre  :) avevo comprato le flash perchè avevo visto su ebay erano molto comuni e vendute in quantità per arduino (e hanno anche discrete dimensioni), e puntualmente ho sbagliato  ;D vedrò di cambiare con una EEPROM, sperando il problema sia quello  ;)
6
Hello,

I am using a Teensy 2.0 as a keyboard emulator with a computer. I am hoping to program it with 2 buttons: One when held down will go forward (Right Arrow Key) and one will go backward (Left Arrow Key) in a video when held down.
I have gotten it to move right and left but when holding the button down it doesn't work like a keyboard when a key is held down.

Could someone please guide me on what code to add/change to achieve this?
I am pretty new to this. Thanks!


Here is the code I currently have
_________________________________


#include <Bounce.h>

// Define our two buttons. We are using the
// 3rd party "bounce" library to more reliably
// read the button clicks.
//
// Read more:
// https://www.pjrc.com/teensy/td_libs_Bounce.html
Bounce buttonTrue = Bounce(PIN_D4, 10);
Bounce buttonFalse = Bounce(PIN_B1, 10);

// Setup the two buttons with the pins we
// have connected to and make sure to
// make use of the internal pull-up circuitry
void setup() {
  pinMode(PIN_D4, INPUT_PULLUP); // True button
  pinMode(PIN_B1, INPUT_PULLUP); // False button
  pinMode(PIN_D6, OUTPUT); // LED
}

void loop() {
  buttonTrue.update();
  buttonFalse.update();

  // Our 'true' button; outputs a 't' keypress
  if (buttonTrue.fallingEdge()) {
  Keyboard.press(KEY_RIGHT_ARROW);
  Keyboard.release(KEY_RIGHT_ARROW);
  }

  // Our 'false' button; outputs a 'f' keypress
  if (buttonFalse.fallingEdge()) {
  Keyboard.press(KEY_LEFT_ARROW);
  Keyboard.release(KEY_LEFT_ARROW);
  }

}
7
Sensors / Re: Soil temperature sensor (v...
Last post by Koepel - Today at 07:41 pm
The raw ADC value from analogRead() makes no jump, but that is a different analogread().
You can investigate further, then you have to find the odd data in the raw ADC data.
Perhaps there is a glitch in the ouput from the sensor, perhaps there is electrical noise from another source.
Instead of trying to find the cause, you can removing it in the sketch, or use the average of 500 samples to filter it out.
8
General Discussion / Re: 3D Printer
Last post by jord12 - Today at 07:40 pm
hi, i also search for 3d printer but large 60-70 cm. do you have some ideas?
9
In a spreadsheet application the date/time may be shown in human readable format in the cells, the underlying storage is always in UNIX time format, as that's easy to work with for a computer. It's just much more hidden from the user than when working with an Arduino - and that's part of the fun of working with such microcontrollers.

For your search problem, you can of course just start searching line by line from either end of the file until you get to the one you need, but it's not exactly efficient.

If there is indeed the possibility of a gap in the data, what will work a lot more efficient is to take the data 8,640 records ago (where you expect it). If you have been running for the past 24 hours you'll see the exact time stamp you expect, and you're done searching. If not, check the difference between the time you see now, and the time you expect, calculate how many records you are off, adjust your seek position, and try again. Within a few iterations you'll have the required record.

Then, as it's a continuous thing and you want to find yesterday's record every 10 seconds: keep that search position (store it in a global variable). 10 seconds later, you simply read the next record, it's most likely the one you need. If it's suddenly much later a time than you expect, just keep the position and return an error or whatever you think appropriate. It simply means there's a gap in the data, and you will catch up. You will have to account for the difference to not be exactly a multiple of 10 seconds as well, of course.

I'm about to start a similar logging battle - but with SPIFFS (ESP8266 internal), and with monthly logging, so at least a lot less records. But enough work to be done on them, as it's got to be handling data of up to 246 nodes :-)
10
As a useful reference, download one of the many pin-out diagrams available from Google.
Pages: [1] 2 3 ... 10