Show Posts
Pages: 1 2 [3] 4 5 6
31  Using Arduino / Interfacing w/ Software on the Computer / Re: thermostat project on: July 27, 2013, 11:13:12 am
If you want to know what dead band is look at this http://en.wikipedia.org/wiki/Deadband
32  Using Arduino / Interfacing w/ Software on the Computer / Re: Arduino Duemilanove and uno serial connection without any problems ? on: July 23, 2013, 02:11:50 pm
Connect Rx to Tx, Tx to Rx, Gnd to Gnd.

yes but will it have any problems in the future i mean for 2 different arduinos ?
the only problem you might come across, is the lack of spare arduinos for other projects.
33  Using Arduino / Interfacing w/ Software on the Computer / Re: Ubuntu C++ <--> Mega2560 Serial Communication on: July 23, 2013, 01:07:56 pm
Quote
I couldn't find a working code in the web.
Unbelievable.

Quote
Does anybody know, how to solve my problem?
Google again. Perhaps with a less narrow search. C++ on Ubuntu, windoze, etc. is the same.
What's windoze? I have never heard of it.
34  Using Arduino / Microcontrollers / Re: What Are The Pros And Cons Of Not Using The Arduino Bootloader on: October 02, 2012, 01:19:44 am
thanks for the information guys/gals. it looks like i will stick with the bootloader.
i already have a shield for programing attinys so i can add a spot for the atmega328 and burn the bootloader my self. that will save me a couple of $$
35  Using Arduino / Microcontrollers / Re: What Are The Pros And Cons Of Not Using The Arduino Bootloader on: October 01, 2012, 02:56:16 am
well i already know how the use the UNO as an ISP. i just made a shield so i can program the attiny chips
36  Using Arduino / Microcontrollers / What Are The Pros And Cons Of Not Using The Arduino Bootloader on: October 01, 2012, 02:14:23 am
What Are The Pros And Cons Of Not Using The Arduino Bootloader. i have been searching and cant find out what is better bootloader or no bootloader.


To bootload or to not bootload.... that is the question
37  Using Arduino / Microcontrollers / Re: I2C on the ATtiny85 on: May 12, 2012, 04:05:59 am
thanks for the help i will get on to it now.
38  Using Arduino / Microcontrollers / Re: I2C on the ATtiny85 on: May 12, 2012, 03:33:23 am
hey when verifying the example code i get this error "C:\Users\Owner\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:329: error: 'USIPF' was not declared in this scope"

how do i fix this
and what do i need to change to run it at 8MHz
39  Using Arduino / Microcontrollers / Re: I2C on the ATtiny85 on: May 02, 2012, 02:05:28 am
i want to use the DS1307 with the attiny85 but i cant understand the example you provided. can you tell me how i can get the seconds, minutes and hours in to individual integers.
40  Using Arduino / Programming Questions / can i use RTC DS1307 with attiny85 I2C on: May 01, 2012, 10:19:50 pm
hey i want to shrink one of my projects and use an attiny85. i only need the two pins for the RTC and one for a PWM output.

i was thinking about getting the tinywire library and editing the RTC library from adafruit to work with the tinywire library. would this work?

41  Using Arduino / Project Guidance / Re: Project proposal (ha! it will be funny when you read it) on: March 29, 2012, 11:41:20 am
put a small bit of foil on ether side. one is Ground the other is Positive and then the ring can complete the circuit
42  Using Arduino / Project Guidance / Re: Looking for custom enclosure for my project on: March 29, 2012, 04:38:17 am
if you do go with the 3d printing it would be cheaper in the long run to buy a MakerBot (trust me you will use it ALOT) or you can get Ponoko or ShapeWays to make it
43  Using Arduino / Project Guidance / Re: Controlling RGB LED with two buttons. on: March 29, 2012, 04:17:37 am
this video will help with the buttons and how to debounce them

44  Using Arduino / Programming Questions / Re: [SOLVED] int not declared in the scope on: February 11, 2012, 08:42:52 am
ok i got it now..... thanks for your help
45  Using Arduino / Programming Questions / [SOLVED] int not declared in the scope on: February 11, 2012, 08:35:58 am
hey guys and gals
this is my problem.
for some reason it keeps coming up with "lightval not declared in this scope". i have no idea why. can someone please tell my what i am missing
this is the part giving me problems
Quote
void sunset() {
  do{
    delay(50);
    int lightval = analogRead(1);
  } while (lightval > 60)
  
  for (int brightness = 255; brightness >= 0; brightness--) {
   analogWrite(9, brightness);
   delay(3500);
 }
}
and this is the full code
Code:
#include <Wire.h>
#include "RTClib.h"

RTC_DS1307 RTC;

  int amhour = 11;
  int ammin = 0;
  int amsec = 0;
  int pmhour = 21;
  int pmmin = 15;
  int pmsec = 0;
  int brightness;

void setup () {
  Serial.begin(57600);
  Wire.begin();
  RTC.begin();
  
  pinMode(9, OUTPUT);
  
  DateTime now = RTC.now();
  
  int hourval = now.hour();
  int minval = now.minute();
  int secval = now.second();
  
  
  on();
  
  if (hourval >= 12 && hourval <= 20) {
    analogWrite(9, 255);
  }
  
  else analogWrite(9, 0);
  
  if (! RTC.isrunning()) {
  Serial.println("RTC is NOT running!");
  RTC.adjust(DateTime(__DATE__, __TIME__));
  
  }
}

void loop() {
  DateTime now = RTC.now();
  
  int hourval = now.hour();
  int minval = now.minute();
  int secval = now.second();
  
  
  if (secval == amsec && minval == ammin && hourval == amhour) {
   sunrise();
  }
  
  if (secval == pmsec && minval == pmmin && hourval == pmhour) {
   sunset();
  }

  Serial.print(hourval);
  Serial.print(':');
  Serial.print(minval);
  Serial.print(':');
  Serial.print(secval);
  Serial.println();
  
  delay(1000);
  
}

void sunrise() {
  
 for (int brightness = 0; brightness <= 255; brightness++) {
   analogWrite(9, brightness);
   delay(3500);
 }
}

void sunset() {
  do{
    delay(50);
    int lightval = analogRead(1);
  } while (lightval > 60)
  
  for (int brightness = 255; brightness >= 0; brightness--) {
   analogWrite(9, brightness);
   delay(3500);
 }
}

void on() {
  for (int on = 0; on <= 255; on++)
  {
   analogWrite(9, on);
   delay(5);
 }
 
 for (int off = 255; off >= 0; off--)
 {
   analogWrite(9, off);
   delay(5);
 }
}

Pages: 1 2 [3] 4 5 6