Get solderstick at 20% OFF with discount code "LE20" at www.solderstick.com/sale /* ########################################################### # The Hikers Buddy v2 # # 15 Feb 2024 # # by learnelectronics # # kzbin.info # # email: arduino@0169@gmail.com # # Do what you want with the code, please # # attribute to LadyAda & learnelectronics # ########################################################### */ // We need these libraries to talk to the sensor and the LED matrix #include #include "ArduinoGraphics.h" #include "Arduino_LED_Matrix.h" // we need to tell the cpu what we mean when we call bmp & matrix Adafruit_BMP085 bmp; ArduinoLEDMatrix matrix; // This is where we tell the Arduino how we want it to behave for this program void setup() { Serial.begin(9600); if (!bmp.begin()) { Serial.println("Could not find a valid BMP085 sensor, check wiring!"); while (1) {} } matrix.begin(); matrix.beginDraw(); matrix.stroke(0xFFFFFFFF); // add some static text const char text[] = "HBY"; matrix.textFont(Font_4x6); matrix.beginText(0, 1, 0xFFFFFF); matrix.println(text); matrix.endText(); matrix.endDraw(); delay(2000); } // This is the repeating logic of the program void loop() { float ftemp = ((bmp.readTemperature())* 9/5 + 32); // read the temp from the bmp180 and convert to F /* Serial.print("Temp: "); Serial.print (ftemp); Serial.println(" F"); Serial.println(); */ float psipress = (bmp.readPressure()*.0001450377); // read the barimetric pressure and convert to psi /* Serial.print("Pressure: "); Serial.print (psipress); Serial.println(" PSI"); Serial.println(); */ float altfeet = (bmp.readAltitude()*3.28084); // read the altitude and convert to feet /* Serial.print("Altitude: "); Serial.print (altfeet); Serial.println(" Ft."); Serial.println(); */ // matrix stuff-------------------------------------------------- // temp section----------------------------------------- matrix.beginDraw(); matrix.clear(); matrix.stroke(0xFFFFFFFF); matrix.textScrollSpeed(90); matrix.textFont(Font_5x7); matrix.beginText(0, 1, 0xFFFFFF); matrix.println("Temp: "); matrix.endText(SCROLL_LEFT); matrix.endDraw(); matrix.beginDraw(); matrix.clear(); matrix.stroke(0xFFFFFFFF); matrix.textScrollSpeed(90); matrix.textFont(Font_5x7); matrix.beginText(0, 1, 0xFFFFFF); matrix.println((ftemp)); matrix.endText(SCROLL_LEFT); matrix.endDraw(); delay(2000); // pressure section-------------------------------------- matrix.beginDraw(); matrix.clear(); matrix.stroke(0xFFFFFFFF); matrix.textScrollSpeed(90); matrix.textFont(Font_5x7); matrix.beginText(0, 1, 0xFFFFFF); matrix.println("Pres: "); matrix.endText(SCROLL_LEFT); matrix.endDraw(); matrix.beginDraw(); matrix.clear(); matrix.stroke(0xFFFFFFFF); matrix.textScrollSpeed(90); matrix.textFont(Font_5x7); matrix.beginText(0, 1, 0xFFFFFF); matrix.println((psipress)); matrix.endText(SCROLL_LEFT); matrix.endDraw(); delay(2000); // alt section-------------------------------------- matrix.beginDraw(); matrix.clear(); matrix.stroke(0xFFFFFFFF); matrix.textScrollSpeed(90); matrix.textFont(Font_5x7); matrix.beginText(0, 1, 0xFFFFFF); matrix.println("Alt: "); matrix.endText(SCROLL_LEFT); matrix.endDraw(); matrix.beginDraw(); matrix.clear(); matrix.stroke(0xFFFFFFFF); matrix.textScrollSpeed(90); matrix.textFont(Font_5x7); matrix.beginText(0, 1, 0xFFFFFF); matrix.println((altfeet)); matrix.endText(SCROLL_LEFT); matrix.endDraw(); delay(2000); }
@cremvustila8 ай бұрын
Arduino (the official Arduino) tweeted and linked to this video of yours, Paul! Nice!
@learnelectronics8 ай бұрын
Really? Cool. Thanks for telling me!
@twbrkfd17337 ай бұрын
I'm using the display and it works quite well with the scrolling text function. The speed can be adjusted. Take that crap plastic off and maybe you will be able to read it better!
@warrenking18158 ай бұрын
I think the lcd multi line display is still my favorite
@hoboken52248 ай бұрын
In your sketch, put in a space and/or spaces to stop the glitch in the scrolling text.
@yurkshirelad8 ай бұрын
I can’t read the code on my phone’s small screen, but if you’re delaying after displaying the text, maybe that delay is screwing things up? If you delay, maybe you’re stopping the library from updating whatever it’s rendering, and it’s appearing as static junk?
@learnelectronics8 ай бұрын
Check the pinned comment.
@geneirwin6458 ай бұрын
Pad the things you are displaying with spaces and you will not have the trailing garbage. "Temp: "
@shagreobe8 ай бұрын
My opinion is if the arduino is in a box, the matrix wont be seen anyway
@bblod48968 ай бұрын
Nice. Now, test is hiking up the hill 😊 I wonder if you could use your current barometric pressure to adjust for variances sort of like what aircraft do. ☮️ brother.
@tvtoms8 ай бұрын
Can't see the code yet, but try initializing the text variable as blank to begin with.
@learnelectronics8 ай бұрын
Check the pinned comment.
@colramsha27548 ай бұрын
Does the library need updating?
@EdSym18 ай бұрын
Where is the sensor link?
@learnelectronics8 ай бұрын
Bmp180 buy one wherever you like
@larryplatzek90178 ай бұрын
CODE what CODE WHERE? Good video. HAVE A Good Day. How ia Doggly?