Recent Posts

Pages: [1] 2 3 ... 10
1
Deutsch / Re: Selektiermaschine bauen
Last post by Tommy56 - Today at 05:23 pm
Hat auch niemand danach gefragt und ich habs halt im 1. Beitrag vergessen zu schreiben, was für ein Getue........
Bist Du jetzt darauf aus, einen Unbeliebtheitswettbewerb zu gewinnen?

Du vergisst es und wirfst uns Getue vor? Weiter so, dann wird das eine tolle Lösung werden.

Gruß Tommy
2
Sensors / Re: [Beginner] Using a Flex Se...
Last post by wvmarle - Today at 05:23 pm
Screen and LED were working, the problem isn't coming from these wires. But here is what my monitor displayed :
That looks like a floating pin. Did you select the correct pin? Code uses A0. Is it connected properly to that pin?

Do check the voltage at the pin with your multimeter.

Quote
Just a quick question : How do you know that my sensor goes from 27 kOhms to 43 kOhms ?
Simple calculation. You gave the value for the pull-up resistor and the analog readings, the value of the unknown resistor follows from that. It's even independent of the actual value of Vcc, as it's a ratio.
3
Generale / Re: Sensore GSM, consigli degl...
Last post by crisbi71 - Today at 05:23 pm
Perdona la mia ignoranza ma non ho mai avuto bisogno di postare foto quì...e non saprei come fare...non trovo nulla con scritto "allega" o simile...
4
I wanna set an alarm with my watch. But I can't add buttons to go to the menu and set the alarm.
Please help me.

here's my scatch.

//Wire RTC ds1307기반:
  //VCC 3.3v
  //GND GND
  //SDA Analog pin 4
  //SCL Analog pin 5

  #include "RTClib.h"
  #include <SPI.h>
  #include <Wire.h>
  #include <Adafruit_GFX.h>
  #include <Adafruit_SSD1306.h>   //라이브러리

  #define SCREEN_WIDTH 128 // 가로픽셀
  #define SCREEN_HEIGHT 64 // 세로픽셀

// 디스플레이 핀넘버
  #define OLED_MOSI   9
  #define OLED_CLK   10
  #define OLED_DC    11
  #define OLED_CS    12
  #define OLED_RESET 13
  Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT,
    OLED_MOSI, OLED_CLK, OLED_DC, OLED_RESET, OLED_CS);
 

// RTC 셋업
  RTC_DS1307 RTC;
  char monthString[37]= {"JanFebMarAprMayJunJulAugSepOctNovDec"};
  int  monthIndex[122] ={0,3,6,9,12,15,18,21,24,27,30,33};
//


void setup() {
  Serial.begin(9600);
  analogReference(EXTERNAL);
  Wire.begin();
  RTC.begin();
  if (! RTC.isrunning()) {
    Serial.println("RTC is NOT running!");
    RTC.adjust(DateTime(__DATE__, __TIME__));
  }
 
  display.begin(SSD1306_SWITCHCAPVCC, 0x3C); 
  display.setTextSize(1);  // small font size
  display.setTextColor(WHITE);
  display.clearDisplay();
 
}

void loop() {
 //***** RTC **********
  DateTime now = RTC.now();
  display.setCursor(32,57); 
  display.print(now.year(), DEC); 
  display.print('/');
  for (int i=0; i<=2; i++){
    display.print(monthString[monthIndex[now.month()-1]+i]);
  }
  display.print('/');
  display.print(now.day(), DEC);
   
    // 시간표시
  display.setCursor(10,2);
  display.print(now.hour(), DEC);
  display.print(':');
  display.print(now.minute(), DEC);
  display.print(':');
  display.print(now.second(), DEC);
 
  // 아날로그구현
  display.drawCircle(display.width()/2, display.height()/2, 20, WHITE);
  display.drawCircle(display.width()/2, display.height()/2, 2, WHITE);
 
  //시계바늘
  for( int z=0; z < 360;z= z + 30 ){
  //0~360도
    float angle = z ;
    angle=(angle/57.29577951) ; //Convert degrees to radians
    int x2=(64+(sin(angle)*20));
    int y2=(32-(cos(angle)*20));
    int x3=(64+(sin(angle)*(20-5)));
    int y3=(32-(cos(angle)*(20-5)));
    display.drawLine(x2,y2,x3,y3,WHITE);
  }
 
 
  // 초침
  float angle = now.second()*6 ;
  angle=(angle/57.29577951) ; //Convert degrees to radians 
  int x3=(64+(sin(angle)*(20)));
  int y3=(32-(cos(angle)*(20)));
  display.drawLine(64,32,x3,y3,WHITE);
  //
  // 분침
  angle = now.minute() * 6 ;
  angle=(angle/57.29577951) ; //Convert degrees to radians 
  x3=(64+(sin(angle)*(20-3)));
  y3=(32-(cos(angle)*(20-3)));
  display.drawLine(64,32,x3,y3,WHITE);
  //
  // 시침
  angle = now.hour() * 30 + int((now.minute() / 12) * 6 )   ;
  angle=(angle/57.29577951) ; //Convert degrees to radians 
  x3=(64+(sin(angle)*(20-11)));
  y3=(32-(cos(angle)*(20-11)));
  display.drawLine(64,32,x3,y3,WHITE);
 //

  // update display with all data
  display.display();
  delay(100);
  display.clearDisplay();

}
5
Bar Sport / Re: [OT ITA] Lo spamm bar
Last post by maubarzi - Today at 05:22 pm
A quanto ho letto dopo lo schianto sono scesi dalla macchina  e sono stati arrotati da un'altra auto.
Sulla seconda auto guidava Darwin in persona... che doveva confermare la sua teoria...
6
with the code as is, the program keeps reading the temperature samples of the first sensor, but is only reading the initial temperature reading of the second sensor and the reading stays constant from then on
7
Deutsch / Re: Increment und Decrement Va...
Last post by uwefed - Today at 05:22 pm
Es gibt nicht nur Rundungsfehler sondern auch , wenn 2 verschieden große Gleitkommazahlen zusammengezählt werden einen Punkt wo das Dazuaddieren die größere Zahl nicht mehr verändert.
Ok, das ist auch ein Rundungsfehler aber daran denkt man nicht.
Grüße Uwe
9
One obvious problem are these lines
Code: [Select]
 detectTime = millis();
  // turn LED ON
  if ( (millis() - detectTime) <= 2000)
  {
    digitalWrite(ledPin, LOW);
  }

Every time through loop() detectTime is updated to the current value of millis() then immediately afterwards you check to see whether 2 seconds has elapsed since the detect time.  How likely is that to be anything but true ?

Another question.  How is the input wired ?  Do you have a resistor in place to keep it either HIGH or LOW when the button is not pressed or is it floating at an unknown voltage that could be either HIGH or LOW ?
10
Project Guidance / Re: Cause of LED to double bli...
Last post by cmiyc - Today at 05:19 pm
I am utilizing a Mega with ethernet/SD card shield and the pin 13 LED on the shield starts a double blink after ~27sec. while being powered via an external power source. This does not happen while powered via USB.
What is the external power source? Sounds like when your motors run they draw too much current. That causes a brownout on the 2560 chip, causing it to reboot.


I'm not sure if this is an error code or an operational code I've not yet encountered.
Sounds like you're seeing the bootloader run when the processor reboots.
Pages: [1] 2 3 ... 10