Show Posts
Pages: [1] 2
1  Using Arduino / General Electronics / Re: Wire connector types on: April 10, 2014, 09:41:53 pm
What do you guys think about one of these?
Serial Interface Board Module
http://www.ebay.ca/itm/IIC-I2C-TWI-SP-I-Serial-Interface-Board-Module-Port-For-Arduino-1602LCD-Display-/310565362720?pt=LH_DefaultDomain_0&hash=item484f235c20&_uhb=1

I also like the db25 cable. Are there any other cables like that with less pins? I suppose USB can work too (for temp and float sensors).

Edit: Nevermind. I just saw that there's DE-9, DA-15, DC-37, and DD-50 cables.
There's also breakout boards for these! Nice! (For anyone else interested)
http://www.ebay.ca/sch/i.html?_odkw=d-sub+female+50&LH_BIN=1&_osacat=0&_from=R40&_trksid=p2045573.m570.l1313.TR0.TRC0.H0.Xdb+breakout+board&_nkw=db+breakout+board&_sacat=0
2  Using Arduino / General Electronics / Re: Wire connector types on: April 10, 2014, 12:27:34 pm
Thank you for your reply. It's for an arduino controlled aquarium controller. I plan to have the arduino and relays inside the aquarium stand. An LCD and buttons to be in a project box stuck to the side of the aquarium. And various sensors going into the tank. So I need cables that are long, and LCD itself has I think about 12 wires. Also, I need to be able to unplug everything easily if I need to modify something. I want to make it look clean too.
3  Using Arduino / General Electronics / Wire connector types on: April 10, 2014, 12:16:08 pm
Hi,

I need a few wire connectors that has the following properties,

1. Long.
2. 12 or more pins.
3. Be able to easily plug and unplug (like a computer cable).

What kind of connectors can I use for this? What are they called? Maybe something on ebay?
4  Using Arduino / Project Guidance / Re: DS1307 AT24C32 Real Time Clock Module for Arduino on: April 10, 2014, 12:11:25 pm
I suggest you start here - https://learn.adafruit.com/ds1307-real-time-clock-breakout-board-kit/overview and http://playground.arduino.cc/Code/time. Check out the examples in the time library.

Get the DS1307 working and show you current time.

Let say your time variable (time_t) is currentTime.
Then,

Code:

if (hour(currentTime) == 6 && isAM(currentTime) == true) {

//turn on lights

}

5  Using Arduino / Programming Questions / Re: Clear LCD once in loop on: March 26, 2014, 12:30:25 pm
Thanks for the reply! But what if it's something like a sensor input and your not sure it'll reach the exact value. Is there another way of going about this?
6  Using Arduino / Programming Questions / Clear LCD once in loop on: March 26, 2014, 11:35:48 am
Hi,

Can anyone tell me how to clear the LCD once in a loop and just carry on with the rest of the code?

Code:
#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

int number = 0;

void setup() {
  lcd.begin(20, 4);
}

void loop() {
  number = number++;
 
  lcd.print(number);
 
  if(number > 10) {
    //clear lcd once and keep printing the rest of the numbers
    lcd.clear();
  }
 
  delay(1000);
}
7  Using Arduino / Programming Questions / Removing delay command when using time with arduino (ds1307) on: March 20, 2014, 07:35:53 pm
I'm trying to use a ds1307 module to use time with my project. The following is my code to make an LED light up for 5 seconds when I press a push button. Problem is I have to hold the button for a second because of the "delay(1000)" line. Eventually I plan on showing the time on an LCD screen so if I remove the delay I wont be able to display the time. How do I make it so that the button can just be pressed and let go, without holding it down?

Code:
#include <Time.h> 
#include <Wire.h> 
#include <DS1307RTC.h>  // a basic DS1307 library that returns time as a time_t

const int button = 2;
const int led = 8;

int buttonState = 0;
time_t timeStart;
time_t timeEnd;

void setup()  {
  Serial.begin(9600);
 
  pinMode(button, INPUT);
  pinMode(led, OUTPUT);
 
  while (!Serial) ; // wait until Arduino Serial Monitor opens
  setSyncProvider(RTC.get);   // the function to get the time from the RTC
  if(timeStatus()!= timeSet)
     Serial.println("Unable to sync with the RTC");
  else
     Serial.println("RTC has set the system time");
}

void loop(){
 
  buttonState = digitalRead(button);
 
  timeStart = (hour() * 60 * 60) + (minute() * 60) + second();
 
  if(buttonState == HIGH){
    timeEnd = ((hour() * 60 * 60) + (minute() * 60) + second())+5;
  }
 
  if ((timeEnd-timeStart) >=5){
    digitalWrite(led, LOW);
  } else{
    digitalWrite(led, HIGH);
  }

  delay(1000);
}
8  Using Arduino / Programming Questions / Re: Getting elapsed time using ds1307 module on: March 20, 2014, 03:20:35 pm
Thank you for your reply! I think I got it to work. I'm going to attach the code in case someone else finds it useful.

Code:
#include <Time.h> 
#include <Wire.h> 
#include <DS1307RTC.h>  // a basic DS1307 library that returns time as a time_t

const int button = 2;
const int led = 8;

int buttonState = 0;
time_t timeStart;
time_t timeEnd;

void setup()  {
  Serial.begin(9600);
 
  pinMode(button, INPUT);
  pinMode(led, OUTPUT);
 
  while (!Serial) ; // wait until Arduino Serial Monitor opens
  setSyncProvider(RTC.get);   // the function to get the time from the RTC
  if(timeStatus()!= timeSet)
     Serial.println("Unable to sync with the RTC");
  else
     Serial.println("RTC has set the system time");
  Serial.println();
  Serial.print("timeStart");
  Serial.print("\t");
  Serial.print("timeEnd");
  Serial.print("\t");
  Serial.print("\t");
  Serial.print("timeEnd-timeStart");
  Serial.println();
}

void loop(){
 
  buttonState = digitalRead(button);
 
  timeStart = (hour() * 60 * 60) + (minute() * 60) + second();
 
  Serial.print(timeStart);
  Serial.print("\t");
 
  if(buttonState == HIGH){
    timeEnd = ((hour() * 60 * 60) + (minute() * 60) + second())+5;
  }
 
  Serial.print(timeEnd);
  Serial.print("\t");
  Serial.print("\t");
  Serial.print(timeEnd-timeStart);
 
  if ((timeEnd-timeStart) >=5){
    digitalWrite(led, LOW);
  } else{
    digitalWrite(led, HIGH);
  }
 
  Serial.println();
  delay(1000);
}
9  Using Arduino / Programming Questions / Getting elapsed time using ds1307 module on: March 20, 2014, 01:06:19 pm
Hi everyone,

I'm trying to get the elapsed time with a ds1307. The idea is to press a button and have an LED on for 5 seconds and then turn off. I tried to add 5 seconds to the current time. Compare, and when the current time is over 5 seconds turn off LED. Problem is if I press the button at 58 seconds, add 5 seconds and it goes to 63. Time will never reach 63 so the LED will be on forever. I'm pretty new at this so pardon the noobness. Any help/tips please? Is there a better method of doing this?

Code:
#include <Time.h> 
#include <Wire.h> 
#include <DS1307RTC.h>  // a basic DS1307 library that returns time as a time_t

const int button = 2;
const int led = 8;

int buttonState = 0;
time_t current;
time_t duration;

void setup()  {
  Serial.begin(9600);
 
  pinMode(button, INPUT);
  pinMode(led, OUTPUT);
 
  while (!Serial) ; // wait until Arduino Serial Monitor opens
  setSyncProvider(RTC.get);   // the function to get the time from the RTC
  if(timeStatus()!= timeSet)
     Serial.println("Unable to sync with the RTC");
  else
     Serial.println("RTC has set the system time");
}

void loop(){
 
  buttonState = digitalRead(button);
 
  Serial.print(second());
  Serial.print("\t");
  Serial.print(second(current));
 
  if(buttonState == HIGH){
    current = now();
    duration = second(current)+5;

    if(duration>60){
      duration = (duration-60);
  }
}

  Serial.print("\t");
  Serial.print(duration);
 
  if(duration>second()){
    digitalWrite(led, HIGH);
  }else{
    digitalWrite(led, LOW);
    duration = 0;
  }
 
  Serial.println();
  delay(1000);
}
10  Using Arduino / General Electronics / Re: Powering bluetooth module from Arduino pro mini 5v on: November 17, 2012, 09:06:00 am
Thank you for all the replies! I decided to use a LD1117V33 voltage regulator as described here: http://www.kobakant.at/DIY/?p=563
Hopefully it'll be helpful for somebody else in the future.
11  Using Arduino / General Electronics / Re: Powering bluetooth module from Arduino pro mini 5v on: November 16, 2012, 10:32:53 pm
I didn't know that. As you can tell, I'm completly new to electronics -.- Thank you!!
12  Using Arduino / General Electronics / Powering bluetooth module from Arduino pro mini 5v on: November 16, 2012, 08:49:39 pm
Hi,
I have a bluetooth module rated max at 3.3v, and an Arduino pro mini ATmega168, at 5v. When I power the bluetooth module through a resistor divider (1.2k +2.2k) I get around 1.68v only to the bluetooth module. Can somebody explain to my why this happens? Does anyone know how to power a 3.3v module from a 5v arduino?
13  Using Arduino / Networking, Protocols, and Devices / Re: How to enter AT mode in HC-05 bluetooth module on: October 26, 2012, 08:44:32 am
Thanks for replying!
My FTDI is set for 5V but I'm powering the bluetooth through a voltage divider. When I send AT\r\n I don't get anything back (no OK, the cursor in PuTTY just goes back to the beginning). Help?  smiley-sad-blue
14  Using Arduino / Networking, Protocols, and Devices / Re: How to enter AT mode in HC-05 bluetooth module on: October 25, 2012, 11:25:52 pm
Bump! Anyone have any idea?
15  Using Arduino / Networking, Protocols, and Devices / How to enter AT mode in HC-05 bluetooth module on: October 25, 2012, 08:15:24 am
Hi guys,
I'm new to arduino and electronics so please bare with me.
I've been trying to enter AT mode with a HC-05 bluetooth module (http://www.ebay.ca/itm/180957186752?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649). This is what I did;

1. I used a USB to Serial adaptor (http://www.ebay.ca/itm/170910289160?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649).
2. Connected TX bluetooth to RX adaptor, RX bluetooth to TX adaptor (Via a voltage regulator http://www.instructables.com/id/Cheap-2-Way-Bluetooth-Connection-Between-Arduino-a/step3/Wiring-the-Arduino-Bluetooth-transceiver/).
3. Connected power (3.3v) and ground (I used a voltage regulator to bring the 5v from the adaptor down to 3.3v).
4. Then I connected pin 34 bluetooth (PIO11) to 3.3v (To make the pin go high).
5. Opened PuTTY and set it to Serial mode. Used COM8 (the USB to Serial adaptor COM port) and 9600 baud rate. (When this didn't work I also tried 38400 baud rate).
6. In the terminal section of PuTTY set Local echo to Force on.
7. Entered "AT\r\n" in PuTTY.

I didn't get an OK as the result. Did I do something wrong? Any help please?

Instructions on how to enter AT command mode (http://elecfreaks.com/store/download/datasheet/Bluetooth/HC-0305%20serail%20module%20AT%20commamd%20set%20201104%20revised.pdf)
Pages: [1] 2