File tree Expand file tree Collapse file tree 1 file changed +16
-14
lines changed Expand file tree Collapse file tree 1 file changed +16
-14
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,22 @@ void setup() {
82
82
void loop () {
83
83
84
84
Oled.setFont (u8x8_font_amstrad_cpc_extended_r);
85
+
86
+ // when using u8g8 instead of u8g2, cursor values
87
+ // are in characters, not pixels
88
+ Oled.setCursor (0 , 4 );
89
+ // If accelerometer and altimeter are queried too close to one another
90
+ // this causes a hang, so we read this first.
91
+ Oled.print (" x:" );
92
+ Oled.print (Accelerometer.readX ());
93
+ Oled.print (" y:" );
94
+ Oled.print (Accelerometer.readY ());
95
+ Oled.setCursor (0 , 5 );
96
+ Oled.print (" z:" );
97
+ Oled.print (Accelerometer.readZ ());
98
+ Oled.print (" T:" );
99
+ Oled.print (Environment.readTemperature ());
100
+ Oled.print (" C" );
85
101
86
102
Oled.setCursor (0 , 0 );
87
103
Oled.print (" But:" );
@@ -114,20 +130,6 @@ void loop() {
114
130
Oled.print (light_value);
115
131
Oled.print (" " );
116
132
117
- // when using u8g8 instead of u8g2, cursor values
118
- // are in characters, not pixels
119
- Oled.setCursor (0 , 4 );
120
- Oled.print (" x:" );
121
- Oled.print (Accelerometer.readX ());
122
- Oled.print (" y:" );
123
- Oled.print (Accelerometer.readY ());
124
- Oled.setCursor (0 , 5 );
125
- Oled.print (" z:" );
126
- Oled.print (Accelerometer.readZ ());
127
- Oled.print (" T:" );
128
- Oled.print (Environment.readTemperature ());
129
- Oled.print (" C" );
130
-
131
133
Oled.setCursor (0 , 6 );
132
134
Oled.print (" Hum: " );
133
135
Oled.print (Environment.readHumidity ());
You can’t perform that action at this time.
0 commit comments