-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
+ remove examples from LCD5110
- Loading branch information
holzheu
authored and
holzheu
committed
Sep 27, 2020
1 parent
ec29b1a
commit 53fa4ce
Showing
16 changed files
with
119 additions
and
568 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* Test to run bevor LCD is soldered to board | ||
* Check pins of LCD and HX711 against GND to | ||
* see if there are solder shortcuts on the chip | ||
* | ||
*/ | ||
|
||
void setup(void){ | ||
Serial.begin(9600); | ||
Serial.println("Starting"); | ||
for(uint8_t i=2;i<14;i++){ | ||
pinMode(i,INPUT_PULLUP); | ||
Serial.print(i); | ||
Serial.print(" "); | ||
} | ||
for(uint8_t i=0;i<6;i++){ | ||
pinMode(A0+i,INPUT_PULLUP); | ||
Serial.print("A"); | ||
Serial.print(i); | ||
Serial.print(" "); | ||
} | ||
Serial.println(); | ||
} | ||
|
||
void loop(void){ | ||
for(uint8_t i=2;i<14;i++){ | ||
if(i>9) Serial.print(" "); | ||
|
||
Serial.print(digitalRead(i)); | ||
Serial.print(" "); | ||
} | ||
for(uint8_t i=0;i<6;i++){ | ||
Serial.print(" "); | ||
Serial.print(digitalRead(A0+i)); | ||
Serial.print(" "); | ||
} | ||
Serial.println(); | ||
delay(1000); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
#include <HX711Array.h> | ||
#include <NTC.h> | ||
#include <Sleep.h> | ||
uint8_t dout[] = {HX711_DOUT}; | ||
uint8_t sck = HX711_SCK; | ||
|
||
HX711Array scale; | ||
NTC_HX711 ntc(scale, 2 * 470000.0, 10.0); | ||
|
||
#include <LCD5110_Basic.h> | ||
LCD5110 myGLCD(NOKIA_SCLK, NOKIA_DN, NOKIA_DC, NOKIA_RST, NOKIA_CE); | ||
|
||
extern uint8_t SmallFont[]; | ||
|
||
volatile uint8_t on_flag = 0; | ||
volatile uint8_t tar_flag = 0; | ||
|
||
volatile uint16_t tics; | ||
ISR(TIMER2_OVF_vect) { | ||
tics++; | ||
} | ||
|
||
void isr_int0(void) { | ||
on_flag = 1; | ||
} | ||
|
||
void isr_int1(void) { | ||
if (! tar_flag) tar_flag = 1; | ||
} | ||
void setup() | ||
{ | ||
Serial.begin(9600); | ||
Sleep.setupTimer2(2); //init timer2 to 1/16 sec | ||
pinMode(NOKIA_VCC, OUTPUT); | ||
pinMode(NOKIA_LED, OUTPUT); | ||
digitalWrite(NOKIA_VCC, HIGH); | ||
Sleep.setupTimer2(2); //init timer2 to 1/16 sec | ||
pinMode(2, INPUT_PULLUP); | ||
attachInterrupt(digitalPinToInterrupt(2), isr_int0, FALLING); | ||
pinMode(3, INPUT_PULLUP); | ||
attachInterrupt(digitalPinToInterrupt(3), isr_int1, FALLING); | ||
|
||
myGLCD.InitLCD(); | ||
myGLCD.setFont(SmallFont); | ||
myGLCD.print("Starting", LEFT, 8); | ||
scale.begin(dout, 1, sck); //start HX711Array with 1 ADCs | ||
scale.set_no_sleep(1); | ||
scale.power_up(); | ||
Serial.println("Setup done"); | ||
} | ||
|
||
void loop() | ||
{ | ||
Serial.println("Loop start"); | ||
if (on_flag) { | ||
delay(100); | ||
digitalWrite(NOKIA_LED, ! digitalRead(NOKIA_LED)); | ||
on_flag = 0; | ||
} | ||
scale.power_up(); | ||
ntc.readResistance(); | ||
float temp = ntc.getTemp(0); | ||
scale.power_up(); | ||
scale.read_average(1); | ||
long adc = scale.read_average(20); | ||
myGLCD.clrScr(); | ||
char text[20]; | ||
dtostrf(temp, 4, 2, text); // avr-libc function for floats | ||
myGLCD.print("TEMP:", LEFT, 8); | ||
myGLCD.print(text, RIGHT, 8); | ||
ltoa(temp, text, 10); | ||
myGLCD.print("ADC:", LEFT, 16); | ||
myGLCD.print(text, RIGHT, 16); | ||
delay(500); | ||
Serial.println("loop done"); | ||
|
||
} |
55 changes: 0 additions & 55 deletions
55
libraries/LCD5110/examples/Arduino (ARM)/LCD5110_Bitmap/LCD5110_Bitmap.ino
This file was deleted.
Oops, something went wrong.
40 changes: 0 additions & 40 deletions
40
libraries/LCD5110/examples/Arduino (ARM)/LCD5110_Bitmap/arduino_logo.c
This file was deleted.
Oops, something went wrong.
29 changes: 0 additions & 29 deletions
29
libraries/LCD5110/examples/Arduino (ARM)/LCD5110_Bitmap/oshw_logo.c
This file was deleted.
Oops, something went wrong.
51 changes: 0 additions & 51 deletions
51
libraries/LCD5110/examples/Arduino (ARM)/LCD5110_NumberFonts/LCD5110_NumberFonts.ino
This file was deleted.
Oops, something went wrong.
56 changes: 0 additions & 56 deletions
56
libraries/LCD5110/examples/Arduino (ARM)/LCD5110_Sleep_Mode/LCD5110_Sleep_Mode.ino
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.