Click here to Skip to main content
15,884,838 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: InitDialog in splitter Pin
Richard MacCutchan29-Mar-16 4:23
mveRichard MacCutchan29-Mar-16 4:23 
GeneralRe: InitDialog in splitter Pin
Member 1228273829-Mar-16 7:12
Member 1228273829-Mar-16 7:12 
GeneralRe: InitDialog in splitter Pin
Richard MacCutchan29-Mar-16 7:19
mveRichard MacCutchan29-Mar-16 7:19 
GeneralRe: InitDialog in splitter Pin
Member 1228273829-Mar-16 10:41
Member 1228273829-Mar-16 10:41 
GeneralRe: InitDialog in splitter Pin
David Crow29-Mar-16 14:49
David Crow29-Mar-16 14:49 
GeneralRe: InitDialog in splitter Pin
Victor Nijegorodov30-Mar-16 5:09
Victor Nijegorodov30-Mar-16 5:09 
SuggestionRe: InitDialog in splitter Pin
David Crow29-Mar-16 9:11
David Crow29-Mar-16 9:11 
Questionarduino sensor Pin
Member 1240312128-Mar-16 7:35
Member 1240312128-Mar-16 7:35 
Hello,

I am having trouble with my current project and need your help.
Weight sensor is is connected to arduino uno board and to several light sources.
goal is: sensor activated-mode1, sensor unactive-mode 2 for 5 seconds.
Mode 1 is blinking light and mode 2 is normal light.
I have written code sensor activation, for mode1 and mode 2 but it cant get it to work. What im i missing?

sensor :
(www.elecrow.com/weight-sensor-kit-3kg-p-883.html)

code:
sensor activation:

#include <Hx711.h>

#define LED 6
#define ADC1 A2
#define ADC2 A3
#define THRESHOLD 100.

Hx711 scale(ADC1, ADC2);

void setup() {
pinMode(LED, OUTPUT);
}

void loop() {
digitalWrite(LED, HIGH);
delay(500);
if(scale.getGram() > THRESHOLD)
digitalWrite(LED, LOW);
delay(500);
}


mod1 blinking

int led = 13;

void setup() {
pinMode(led, OUTPUT);
}

void loop() {
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(500); // wait
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(500); // wait
}

mod 2 light for 5 sec

int led = 13;

void setup() {
pinMode(led, OUTPUT);
}

void loop() {
digitalWrite(led, HIGH);
delay(0);
digitalWrite(led, LOW);
delay(5000);
}
AnswerRe: arduino sensor Pin
David Crow28-Mar-16 9:40
David Crow28-Mar-16 9:40 
AnswerRe: arduino sensor Pin
Richard MacCutchan28-Mar-16 21:44
mveRichard MacCutchan28-Mar-16 21:44 
GeneralRe: arduino sensor Pin
Sascha Lefèvre28-Mar-16 23:31
professionalSascha Lefèvre28-Mar-16 23:31 
GeneralRe: arduino sensor Pin
Member 1240312130-Mar-16 23:19
Member 1240312130-Mar-16 23:19 
GeneralRe: arduino sensor Pin
leon de boer3-Apr-16 6:43
leon de boer3-Apr-16 6:43 
QuestionCOleDateTime Pin
Still learning how to code27-Mar-16 9:48
Still learning how to code27-Mar-16 9:48 
AnswerRe: COleDateTime Pin
Serkan Onat27-Mar-16 12:44
professionalSerkan Onat27-Mar-16 12:44 
GeneralRe: COleDateTime Pin
Still learning how to code27-Mar-16 22:11
Still learning how to code27-Mar-16 22:11 
GeneralRe: COleDateTime Pin
Jochen Arndt28-Mar-16 1:50
professionalJochen Arndt28-Mar-16 1:50 
GeneralRe: COleDateTime Pin
Still learning how to code28-Mar-16 22:58
Still learning how to code28-Mar-16 22:58 
GeneralRe: COleDateTime Pin
Jochen Arndt28-Mar-16 23:08
professionalJochen Arndt28-Mar-16 23:08 
QuestionOld code Pin
RomTibi27-Mar-16 9:18
RomTibi27-Mar-16 9:18 
AnswerRe: Old code Pin
Patrice T27-Mar-16 10:46
mvePatrice T27-Mar-16 10:46 
AnswerRe: Old code Pin
Sascha Lefèvre27-Mar-16 12:38
professionalSascha Lefèvre27-Mar-16 12:38 
AnswerRe: Old code Pin
David Crow28-Mar-16 3:55
David Crow28-Mar-16 3:55 
SuggestionRe: Old code Pin
Richard MacCutchan28-Mar-16 6:08
mveRichard MacCutchan28-Mar-16 6:08 
AnswerRe: Old code Pin
Richard MacCutchan28-Mar-16 6:03
mveRichard MacCutchan28-Mar-16 6:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.