Click here to Skip to main content
15,121,741 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: InitDialog in splitter Pin
Richard MacCutchan29-Mar-16 5:23
mveRichard MacCutchan29-Mar-16 5:23 
GeneralRe: InitDialog in splitter Pin
Member 1228273829-Mar-16 8:12
MemberMember 1228273829-Mar-16 8:12 
GeneralRe: InitDialog in splitter Pin
Richard MacCutchan29-Mar-16 8:19
mveRichard MacCutchan29-Mar-16 8:19 
GeneralRe: InitDialog in splitter Pin
Member 1228273829-Mar-16 11:41
MemberMember 1228273829-Mar-16 11:41 
GeneralRe: InitDialog in splitter Pin
David Crow29-Mar-16 15:49
MemberDavid Crow29-Mar-16 15:49 
GeneralRe: InitDialog in splitter Pin
Victor Nijegorodov30-Mar-16 6:09
MemberVictor Nijegorodov30-Mar-16 6:09 
SuggestionRe: InitDialog in splitter Pin
David Crow29-Mar-16 10:11
MemberDavid Crow29-Mar-16 10:11 
Questionarduino sensor Pin
Member 1240312128-Mar-16 8:35
MemberMember 1240312128-Mar-16 8: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 10:40
MemberDavid Crow28-Mar-16 10:40 
AnswerRe: arduino sensor Pin
Richard MacCutchan28-Mar-16 22:44
mveRichard MacCutchan28-Mar-16 22:44 
GeneralRe: arduino sensor Pin
Sascha Lefèvre29-Mar-16 0:31
professionalSascha Lefèvre29-Mar-16 0:31 
GeneralRe: arduino sensor Pin
Member 1240312131-Mar-16 0:19
MemberMember 1240312131-Mar-16 0:19 
GeneralRe: arduino sensor Pin
leon de boer3-Apr-16 7:43
Memberleon de boer3-Apr-16 7:43 
QuestionCOleDateTime Pin
Still learning how to code27-Mar-16 10:48
MemberStill learning how to code27-Mar-16 10:48 
AnswerRe: COleDateTime Pin
Serkan Onat27-Mar-16 13:44
professionalSerkan Onat27-Mar-16 13:44 
GeneralRe: COleDateTime Pin
Still learning how to code27-Mar-16 23:11
MemberStill learning how to code27-Mar-16 23:11 
GeneralRe: COleDateTime Pin
Jochen Arndt28-Mar-16 2:50
professionalJochen Arndt28-Mar-16 2:50 
GeneralRe: COleDateTime Pin
Still learning how to code28-Mar-16 23:58
MemberStill learning how to code28-Mar-16 23:58 
GeneralRe: COleDateTime Pin
Jochen Arndt29-Mar-16 0:08
professionalJochen Arndt29-Mar-16 0:08 
QuestionOld code Pin
RomTibi27-Mar-16 10:18
MemberRomTibi27-Mar-16 10:18 
AnswerRe: Old code Pin
Patrice T27-Mar-16 11:46
mvePatrice T27-Mar-16 11:46 
AnswerRe: Old code Pin
Sascha Lefèvre27-Mar-16 13:38
professionalSascha Lefèvre27-Mar-16 13:38 
AnswerRe: Old code Pin
David Crow28-Mar-16 4:55
MemberDavid Crow28-Mar-16 4:55 
SuggestionRe: Old code Pin
Richard MacCutchan28-Mar-16 7:08
mveRichard MacCutchan28-Mar-16 7:08 
AnswerRe: Old code Pin
Richard MacCutchan28-Mar-16 7:03
mveRichard MacCutchan28-Mar-16 7: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.