Show Posts
Pages: 1 2 [3] 4 5 ... 12
31  Using Arduino / Programming Questions / Re: What does abort() do? on: January 24, 2013, 03:38:11 pm
setup() is running, and buffering serial data. Then, loop() starts and buffers some more. Before anything can get shifted out, you call abort(), which does what it's name suggests. It stops the program that is running, including interrupts (which are how the serial data gets shifted out).
That was quite precise and complete. Respect!

32  Using Arduino / Programming Questions / Re: What does abort() do? on: January 24, 2013, 03:36:38 pm

Code:
while ( true );

I see now!!! I've found it in stdlib.h :-)
Thank you anyway, I appreciate that. It's nice to know there's people like you out there :-)
33  Using Arduino / Programming Questions / Re: What does abort() do? on: January 24, 2013, 03:35:06 pm
It clearly has undesirable side-effects.  Why would want to use it?

I understand you care for others ... that's nice :-)
34  Using Arduino / Programming Questions / Re: What does abort() do? on: January 24, 2013, 03:33:28 pm
Btw, I was going to use abort() as a measure for halting the software in case totally unacceptable data were used as input.
I understand that's somehow drastic as an error handling method. I wonder how/if/when abort() maybe used such as that.

I'm not going to write some crazy complex error handling routine for this particular purpose anyway, enough being to simply stop everything.
35  Using Arduino / Programming Questions / What does abort() do? on: January 24, 2013, 03:22:28 pm
I don't get it, please help me out with this.

What does actually abort() do in Arduino? I don't find any related documentation.

If I upload this code into Arduino:
Code:
void setup() {
  Serial.begin(19200);
  Serial.println("Start");
}
void loop() {
  Serial.println("Start Loop");
  abort();
}>
I only get two dashes on the serial monitor, no "Start Loop" and even no "Start". It looks like not even setup() is running. Well, actually that's impossible, since something is "moving" on the serial line after all.

What am I missing?

36  Using Arduino / Microcontrollers / Re: Comprehensive ATtiny libraries overview? on: January 14, 2013, 06:01:31 pm
I'm working on a similar project, have you had success down-scaling your components?  I'm in the same boat, thinking the Atmega328p is overkill for this application.

No mate, I was distracted by my daily job, didn't have much time to spend on that. So I went on with a full flagged ATmega328.

But the idea is still in place. I really need to improve my programming skills though, before I can try and customize the libs like I want them to be. I still think recompiling OneWire and VirtualWire for ATTiny is doable, especially if I'm going to include strictly necessary code into them only. It's just that I'm still not the right person to do that, not yet at least.
37  Using Arduino / Networking, Protocols, and Devices / Re: Multiplexing switch inputs with an i2c ic? on: January 14, 2013, 11:43:48 am
Sorry about the noise ... I've already found out about the PCF8574 by myself :-)
38  Using Arduino / Networking, Protocols, and Devices / Multiplexing switch inputs with an i2c ic? on: January 14, 2013, 11:25:16 am
I'm not shure if something like that exist, I didn't find anything, maybe I'm looking in the wrong direction.

Is there some kind of IC that's capable of "sensing" a group of digital inputs (like a bunch of switch buttons) and provide their status on an i2c channel (e.g. a microcontroller asking for it on the i2c wire)?

I am thinking about a way of adding a bunch of switches to a system's UI without using other multiplexing methods. Since I'm already using i2c on the system I may as well hook up another device on the wire and let it act as an interface to those switches. That would simplify the project. But I really don't know if something like that already exist. Any hint?

39  Using Arduino / Networking, Protocols, and Devices / Re: Some question about i2c, smb, wire.h and twi ... all together. on: January 11, 2013, 12:34:24 pm
As you said I'm not very clear ... actually because I'm not clear myself. Not having enough electronic/coding background, I cannot (yet) sort out all the words I see : i2c, wire.h, twi, etc.

Wire.h is the library Arduino provides for Two Wire Interface communications, which is generally called i2c.
Read here: http://arduino.cc/en/Reference/Wire

Quote
My question should be :
- what are the libraries available ?
- is there any compatibility to look at ? (on the IDE side and on the board side (uno, due, leonardo, mega, etc.)
- for each library what does it cover ? will my component be compatible with it ?
- ?!?
- Some libraries may not be compatible with a specific Arduino IDE (e.g. the Wire library changed with Arduino ver.1). But the i2c library (which is called Wire.h in Arduino) comes with it anyway. You don't have to manually install it alongside. It comes with the package.
- The i2c protocol is generic enough to deal with any component talking this "language" on the wire. Consider it as a tool to "talk" to other devices on the wire. It's up to the various devices to listen to that data coming in, and acting accordingly. You program the Arduino in order to make it "talk" to them, send them "orders" or "requests for data". i2c provides only an interface for this talking to happen; but it's up to you to make all those devices listen and talk meaningfull "sentences".

I bet everything will be much clearer as soon as you start coding some basic example with a few i2c devices.

Quote
And then, on the component side it is SMB compatible. So where does SMB fit in the i2c language or the twi thingy?
SMB is a subset of i2c. Check wikipedia for some more: http://en.wikipedia.org/wiki/I%C2%B2C

You should really spend some time reading the i2c basics first though. That will save you lots of time (and troubles) in the immediate future :-)
40  International / Hardware / Re: Collegamento wifi economico: esiste? (anche fai-da-te!) on: January 11, 2013, 11:26:25 am
Ti aggiungo un dettaglio, mi pare di ricordare che i radiomodelli (se si parla di macchine radiocomandate) vengono controllati da radicomandi che operano sui 2.4GHz
Se vuoi allinearti puoi provare con gli nRF24L01 che ti hanno suggerito prima, che però sono molto diversi dai moduli 433MHz di cui ti ho parlato io.
41  International / Hardware / Re: Collegamento wifi economico: esiste? (anche fai-da-te!) on: January 11, 2013, 11:07:02 am
Lascia stare i modulini a 433MHz, in genere devi codificare/decodificare manualmente i dati con una qualche codifica per poter comunicare, hanno un range inferiore al bluetooth in tantissimi casi e un sacco di altri problemi di interferenze

Dissento su alcuni dettagli. E' vero che l'economicità di sti' 433MHz da 1 euro e mezzo non ne fa dei campioni di performance ma è bene dare informazioni più corrette.

La portata è limitata a pochi centimetri se li si usa così come sono. Basta aggiungere un'antennino rudimentale (17cm di filo rigido) per estenderne la copertura ad alcune decine di metri (senza ostacoli). Anche aumentare la tensione di alimentazione aiuta ad ampliarne la copertura.

Di interferenze se ne avranno sempre. E' normale su queste frequenze perchè sono quelle rimaste appositamente libere per legge per questi usi "civili" e di apparecchi che sfruttano quelle frequenze ce n'è parecchi. Però c'è da dire che le librerie VirtualWire offrono un protocollo con controllo degli errori. C'è di che poterle usare senza grosse difficoltà. Basta scrivere del codice pulito con Arduino e si ottengono comunicazioni efficienti.

La mia esperienza (seppur modesta) dopo i primi passi falsi è stata buona e mi sento di consigliare chi voglia prendere in considerazione questi "giocattoli" che i cinesi su eBay quasi te li regalano :-)
42  Topics / Home Automation and Networked Objects / Re: Cheap and small RF Rx/Tx on: January 11, 2013, 10:46:04 am

Those modules are very easy to use with the VirtualWire library. Go get it. It lets you send short data packages, enough for your purpose.
Don't expect long distance range, the signal will suffer because of every obstacle you put inbetween.
I used them at home, they cover some 10meters w/ obstacles. Much depends on the power supply too (higher voltage makes them cover higher distances).
43  International / Software / Re: Rete arduino con Ds1307 e sensore temperatura on: January 11, 2013, 04:47:32 am
come si può notare del debug, ogni tanto il master, invece di riceve 2128 riceve ÿ.

A tal riguardo puoi leggere questo post: http://arduino.cc/forum/index.php/topic,21730.msg161771.html#msg161771

Probabilmente è anche legato al tuo "if (Serial.available())" che non fa un check esatto.
44  International / Software / Re: Rete arduino con Ds1307 e sensore temperatura on: January 11, 2013, 04:38:05 am
Viste le distanze che vuoi coprire, hai mai pensato ai moduli RF a 433MHz? Tipo questi: http://www.ebay.it/itm/433Mhz-RF-transmitter-and-receiver-module-Alarm-Set-for-Arduino-ARM-MCU-WL-/330854868895?pt=LH_DefaultDomain_0&hash=item4d087ca79f

Costano due lire e funzionano discretamente bene. Io un po' li ho usati, potenze basse ma consentono di generare un buon network distribuito senza dover cablare nulla.
45  Using Arduino / Networking, Protocols, and Devices / Re: Accessing SDRAM DIMM SPD eeprom on: January 10, 2013, 04:24:05 am
I'm done. Everything went well at the end. Reading the PC100 SDRAM SPD eeprom with i2c and Arduino is easy if you wire it right (I did not at first!). I ended up wiring it directly to the eeprom ic with a few test hooks instead of using the board's pinout.

Data can be interpreted using the following Intel doc: http://www.taricorp.net/wp-content/uploads/2012/04/SPDSDRAM1.2a1.pdf . It's titled "PC SDRAM Serial Presence Detect (SPD) Specification" Rev.1.2A, December 1997, by Intel.

Just my 2cent to the community :-)
Pages: 1 2 [3] 4 5 ... 12