Show Posts
Pages: 1 ... 40 41 [42] 43 44 ... 68
616  Using Arduino / Storage / Re: Webduino, getting data from SD card on: August 05, 2012, 10:45:26 am
You mean getting an image into the webpage ?

Try first to load the webpage from the SD card.
There are examples for that.
Adding pictures is simple after that.
The browser sends a 'GET' request for the image, and you return it with the proper content type header.
The content type for html is "text/html" and for a *.jpg file it is "image/jpeg".
If you expand that for all types, you can have a whole site with subdirectories, javascript and stylesheets on the SD card.

I have my webpage on the SD card, and use the text "$1" and "$2" in the webpage where the Arduino will place its own data.
So while loading the webpage from the SD card, I check for '$' and read the number after it.
617  Using Arduino / Project Guidance / Re: Need advise on an project.... on: August 05, 2012, 10:29:44 am
A range of 1000m is long. Too long for hobby electronics I think.

If you use a shortwave radio, you probably need a permit/diploma or so.

You might look at these:
And use a (semi-)professional devices. But I don't know if you are allowed to send digital information.

It is possible to use normal 100mW wifi or an other 2.4GHz device with a dedicated antenna to reach 1km. But those antenna's are illegal in some countries. There are routers that can output even up to 2W, but those are also illegal in many countries.

Perhaps an Arduino with Ethernet shield and routers with directional antenna's is the best solution. But since you have many remote modules, you cannot use just two directional antenna's to communicate over 1km. But if the 'master' antenna can be placed high and is more than 100mW, and all the remote modules have directional antenna's, it might be possible. The Ethernet shield has a SD card slot, so you would need some sound/voice shield. Perhaps both the ethernet and voice shield can be used, but perhaps they share some signals, so you might have to alter something. If you choose this, it is all standard working hardware, only the range is a problem. For a good range, you better choose a lower frequency.

What about using a mobile phone ? You could perhaps use sms text messages for the commands.
Or this:
618  Using Arduino / Networking, Protocols, and Devices / Re: Need help deciding which wireless connection to use! on: August 05, 2012, 04:50:18 am
433MHz or 2.4GHz.

Do you want to send and receive both ways, then I would use one of those small 2.4GHz boards.
I don't know if some of them can be placed in sleep mode.
619  Using Arduino / Networking, Protocols, and Devices / Re: Question about SDA/SCL settings in twi library on: August 05, 2012, 04:46:05 am
For I2C (using the Wire library) pull-up resistors are needed to make the I2C-bus work.
So the internal pull-up resistors are activated, although they are very weak (20k).

This is however a problem for 3.3V I2C devices, which can't have a pull-up to +5V.
So the most common solution is to use 4k7 external pull-up resistors to 3.3V for 3.3V devices.

But I would like to have to internal pull-up resistors removed.....
620  Using Arduino / Networking, Protocols, and Devices / Re: Leonardo communicate with Pro Mini 3.3v on: August 05, 2012, 04:42:32 am
If you use 4k7 pull-up resistors to 3.3V, it should work with I2C.
There is some information here:

I2C is not very fast, but since both SDA and SCL are used with open-collector, the 5V versus 3.3V is less of a problem than with other solutions.
621  Using Arduino / Sensors / Re: Sensor Calibration Scan after a Button Input on: August 05, 2012, 04:36:44 am
There are a lot possibilities. You could use a hardware timer, interrupts, interrupt service routines, etc.

But let's start to make it easy.
First of all, this code "while (millis() < 5000)" will only work if millis() starts at 0, so it is only valid at startup.
Make that code work at any moment:
unsigned long millis_now = millis();
while (millis() < (millis_now + 5000))

How do you set the initial values for  sensorMax0 and sensorMin0.
You could do it like this:
// set initial values
sensorValue0 = analogRead(sensorPin0);
sensorMax0 = sensorMin0 = sensorValue0;

// Find min and max
unsigned long millis_now = millis();
while (millis() < (millis_now + 5000))

Next, place the calibration in a function.
int sensorMin0, sensorMax0;
void Calibrate(void)

The sensorMin0 and sensorMax0 are globally, and can be used anywhere.
If you want the function to return them, you have to use parameters with pointers to integers.

Call the function at start, en when the butten is pressed.
622  Using Arduino / Programming Questions / Re: Arduino refrence example program on: August 05, 2012, 04:21:18 am
A boolean can be true or false, that's all.

Like this:
boolean sensor_active = true;
if (sensor_active)
  // the sensor is active

There a operators, which can be used. Like the NOT-operator (the '!').
if (!sensor_active)
  // the sensor is not active !

It is even allowed to make true false, and false true, using the NOT-operator.
sensor_active = !sensor_active;

So all you have to do, it say "NOT", if you see an exclamation mark.

623  Using Arduino / Programming Questions / Re: Dimming - what equation do you use to make dimming look linear to human eye? on: August 04, 2012, 01:12:12 pm
As far as I know, the human eye has a log10 for light intensity.
I think that's in the formula by x^10.

But there is a lot written about, with a lot of different calculations.
Even in this forum:
I looks to me that at the end, it's all in the eye of the beholder.
624  Using Arduino / Sensors / Re: Help needed with the MPU-6050. on: August 04, 2012, 04:37:41 am
The sketch compiles for a Duemilanove (both ATmega328 and ATmega168), but you have to update to the new Arduino 1.0.1 !

If you are new to I2C, try the i2c_scanner first :
625  Using Arduino / Sensors / Re: Help needed with the MPU-6050. on: August 04, 2012, 03:43:48 am
The 'F()' only places the string in code memory (in flash), instead of RAM.
So if it is not working, just remove it like this: Serial.println("InvenSense MPU-6050");

If there is a problem with my sketch, I want to fix it!
Have you changed something in the sketch ?
Which Arduino board do you use ?
Are you using the newest Arduino. Version 1.0.1 ?
626  Using Arduino / Sensors / Re: Arduino and 433mhz receiver on: August 03, 2012, 06:38:36 am
I don't know, but I ordered that same receiver a few days ago for the same purpose. I also want to know the status of our alarm sensors.
627  Using Arduino / Sensors / Re: Arduino and 433mhz receiver on: August 02, 2012, 04:30:37 pm
There are chips for that with a certain protocol.
I doubt if the Arduino is able to recognize that.
I have looked for it myself, but have not found it yet.
628  Using Arduino / Sensors / Re: TCRT5000 + TLC5940 + Beer Pong on: August 02, 2012, 04:27:29 pm
You moved the sensor also to 12V, that's good. According to the datasheet the TCRT5000 can have 70V at the collector.

Resistor R3 and R4 don't have to be 6k1. They could be 10k or 22k or so.

I'm still not happy with it that the Op Amp is used to drive a rather large current.
At 12V, you could use CMOS logic, like the CD40106, instead of the Op Amp. In that case you would not need R3 and R4.
The CD40106 could drive a P-channel MOSFET for the leds.

629  Using Arduino / Sensors / Re: TCRT5000 + TLC5940 + Beer Pong on: August 02, 2012, 07:15:05 am
The voltage over a blue led is mostly about 2.8 to 3.6 Volt.
If you use 3 blue leds in series, you can't use +5V anymore.
Do you also have +12V ?
With +12V a single PNP transistor to supply current to the leds can't be used anymore. You need two transistors. And if you have two transistors, you could remove the Comparator.
630  Using Arduino / Sensors / Re: TCRT5000 + TLC5940 + Beer Pong on: August 02, 2012, 04:10:54 am
I hope someone else have a good idea how to do this easier.
My idea is to use an ATtiny per cup and with resistors for the leds.

Your explanation is even more confusing for me.
3 leds per TLC input -> output ?
Cathode to sensor -> anode ?
Perhaps adding a PNP transistor (and a resistor to the base) after the comparator will be enough to make it work. Although I still don't understand what you want the result to be.
Pages: 1 ... 40 41 [42] 43 44 ... 68