Show Posts
Pages: 1 [2] 3 4 ... 72
16  Using Arduino / Project Guidance / Re: GARDUINO with Ethernet Shield on: April 11, 2014, 09:30:06 pm
Hi,

The problem doesn't appear to be timing.  Your Water() function never checks to see if the plants are sufficiently watered.  It continues to test the same value in moisture_val without updating moisture_val with another analogRead().  Water() needs something like this:
Code:
void Water() {     
//    if (moisture_val>260){  <- test used to say this
    if(analogRead(moistureSensor)>260) {
      On();
      Alarm.delay(10000);   
      TurnOff();
    } else {
      Serial.print("Moist Ok");
      Serial.println();
    }
}
Hopefully this will help your future water bill  smiley

Cheers ! Geoff
17  Using Arduino / Project Guidance / Re: Bluetooth Problem on: April 11, 2014, 09:10:49 pm
Hi,

If you send characters to the bluetooth module when not in setup mode does the Arduino receive them?  If so, can you include your code in your next post so we can see what you're doing on that side?

Geoff
18  Using Arduino / Microcontrollers / Re: ir library not working on stand alone mode on: April 10, 2014, 07:32:32 pm
Great to to see. All the best with your project! Geoff
19  Using Arduino / Microcontrollers / Re: ir library not working on stand alone mode on: April 09, 2014, 05:33:20 pm
What might be other possibilities of error ?
It seems like you found the source of the issue.  Just get the timing issue sorted with a functional 16MHz crystal or resonator and it should be perfect.

Of course you need to remember to set the fuses internal to the ATmega to get it to expect and use the correct clock signal source.  This is done by choosing the "load bootloader" option in the IDE and having a target board selected that uses that clock source - in your case Uno.  If you have loaded the bootloader for Uno (say) and you're using a different clock source (other than 16MHz) your timing will be out.  Timing is everything in this application.

Cheers ! Geoff

Edit: added note on fuses
20  Using Arduino / Microcontrollers / Re: [Q] Firmata on ATTiny85? on: April 08, 2014, 07:59:35 am
I only mentioned Digispark since it was based on the uC you mentioned specifically.  There's no confirmation Firmata has been ported to run on that platform yet, at least that I could find.

You could start with an Arduino Pro Mini or similar for a very low cost, not much more than a standalone microcontroller.but gives you a complete and working Arduino for under $USD5 delivered, plenty around that price point on eBay based on ATMega328.  You'll still need a USB converter (FTDI breakout say) to talk to your PC.  They're about that same price - so around $USD10 all up. 

At least you know Firmata will work on Arduino via the library.

Cheers! Geoff
21  Using Arduino / Microcontrollers / Re: ir library not working on stand alone mode on: April 07, 2014, 05:34:38 pm
Hi

Have you tried adding serial debugging to your code to see if it is still interpreting the iR signals (but the LEDs are not firing) or if it's not seeing the iR signals entirely?  Are you seeing the default LED display from your switch/case every time?

If you add an LED between the output and VCC pins on your TSOP receiver does it flash when the iR signal is received (to eliminate the possibility your sensor has failed)?  This Adafruit article shows how.
Ok I got it. Thanks! Now comfortably examine the code and please tell the solution. I'm here for solution !!
If it worked on the Uno, the problem is less likely to be in your code.  Have you tried a simple test sketch to flash the LEDs to ensure they all function and that your standalone is actually working (and working at the correct clock speed)?  Setup a flash at 1sec intervals to ensure that what you see is running correctly.  If they're flashing slower, the chip may still be running on its internal clock rather than the external crystal - indicating you need to set the internal fuses still.

Lots of options here.  Lets' remove the obvious ones and let us know how you go.

Cheers ! Geoff

Edit: added adafruit link
22  Using Arduino / Microcontrollers / Re: Arduino Uno R3-Compatibles with more memory on: April 06, 2014, 08:47:04 pm
The Goldilocks by Phillip Stevens and available via Freetronics was such a product.  Initially a crowdfunded project, it's been recently retired and they're working on the next iteration (link to foum post asking for feature suggestions). 

Sorry it's not an immediate solution.  From that forum thread you'll see a post from Phil regarding his latest project which is a derivative of Goldilocks with stereo DACs which is soon to be a crowdfunded release.  Perhaps that could be of use?

Alternatively have you considered putting a standalone ATMega328P on a shield and offloading some of the tasks to that microcontroller with comms to the Arduino ?

Cheers ! Geoff
23  Community / Exhibition / Gallery / Re: Custom RC transmitter on: April 06, 2014, 07:37:31 pm
Thanks for sharing this.  You've added a layer of realism without adding complexity which is quite a feat.

Cheers ! Geoff
24  Using Arduino / Microcontrollers / Re: attiny wired to pot input, but what if i use "pinMode(ButtonPin, INPUT_PULLUP)" on: April 06, 2014, 07:32:17 am
Hi,

Something I've used before is a state machine, where you store the current state (in your case menu location) in the onboard EEPROM and use the reset on the ATTiny85 as your switch pin. In this case the each time the ATTiny restarts it will need to know where it was in the menu earlier, so it can act on the reset as a button press.  Just have your pot on the other input therefore as before.

I published a trivial example in this post where the reset was used as the sole control for a bathroom shower timer.  Hopefully that example will illustrate what I mean, and this helps.

Cheers ! Geoff
25  Using Arduino / Microcontrollers / Re: [Q] Firmata on ATTiny85? on: April 06, 2014, 07:22:18 am
That's a great question.  I've not seen it anywhere either - there was this thread in the DigiStump forum which mentioned it.  Digispark is ATTiny85 based.  It sounds promising, but was still only theoretical rather than saying it had been done.

Cheers ! Geoff
26  Using Arduino / Microcontrollers / Re: problem with pwm on: April 06, 2014, 04:58:42 am
Hi,

The command you're looking for is analogWrite(pin, value) (link to reference page).  That outputs a PWM signal with a defined duty cycle to the specified pin.

How you utilise it in your code will depend on the motor controller you're driving your motor(s) with.

Cheers ! Geoff
27  Using Arduino / Microcontrollers / Re: ATmega 328 project?? on: March 29, 2014, 05:16:51 am
Hi lindhoutd, you can do what you need with what you're suggesting.  The richness of the Arduino ecosystem means there's rarely just one way to get to your destination.  For some the Arduino made for breadboards would be a Uno and a Protoshield with a breadboard on it.

I agree with PaulRB that it's a matter of preference, but in the end we all end up collecting the whole set smiley-grin 

Welcome to the community lindhoutd!
Geoff
28  Using Arduino / Microcontrollers / Re: Atmega 168 And ATmega8 on Arduino UNO on: March 27, 2014, 02:16:50 am
Hi,

I have heard of people removing the ATMega from the Uno and doing this (for example this instructable) but you could likely skip a step (ie the wiring) by putting the bootloaded uC you want to program in the slot on the Uno to upload to it.

If you want to keep using the bootloader, buy an FTDI breakout board to program your projects without the Uno ongoing.  Nick Gammon's excellent page gives a step-by-step guide to how to use that with a breadboard after programming the bootloader with the Uno.

Cheers !
Geoff
29  Community / Exhibition / Gallery / Re: CodeWire, a range optimized version of VirtualWire on: March 21, 2014, 05:51:29 pm
Thank you for sharing this upgrade. Do you have any test data on the improvements gained, especially at the edge of range?  How far are you able to space these now inside your home?

Geoff
30  Community / Exhibition / Gallery / Re: Reptile Enclosure Controller on: March 18, 2014, 04:23:30 pm
Hi,

Yes I agree.  I admit this had fallen off the back of the priority list but once a few more items are cleared out of the way I might take a tilt at this.  We have a heating pad under one end of the enclosure as well as an iR lamp  but having them both on is overkill, especially granted she's a bluetongue and they're native around here so our winter conditions suit just fine.  The only reason we went with that initially was to prevent hibernation, but last winter we just let that happen and we'll probably continue to do that now.

Cheers ! Geoff
Pages: 1 [2] 3 4 ... 72