

Middlefart
Members-
Posts
79 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by Middlefart
-
I forgot... you need to add air assist. I hacked something together that works but it would be much easier to buy a nozzle with air assist. Have a look at YouTube and eBay or AliExpress and you will find what you need and how it works.
-
You don’t need to modify the laser to make good panels. None of my mods changes how the laser or travel work. I suggest that you start with a standard K40 and add the mods that you need. Just make sure to buy a K40 with the analog controller and not the upgraded “digital” crappy one and also make sure that it is compatible with K40 Whisperer
-
No problem. Glad you enjoy it!
-
Middlefart’s A-10 build At the top, change “24, 5” to “24, 3”, right after ”OLED_RESET),” I think that’s all you need to do. 24 is the size and 5 is the number of digits. I’m not 100% sure that it will work, there might be some other changes that’s needs to be done. #ifdef ALTIMETER disp oled = {Adafruit_SSD1306(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET), 24, 5, {{0,0},{0,0},{0,0},{0,0},{0,0}}}; #else disp oled = {Adafruit_SSD1306(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET), 16, 4, {{0,0},{0,0},{0,0},{0,0},{0,0}}}; #endif
-
Cool! You are most welcome!
-
Middlefart’s A-10 build It looks as the ones I’m using. https://rover.ebay.com/rover/0/0/0?mpre=https%3A%2F%2Fwww.ebay.com%2Fulk%2Fitm%2F253295920124
-
I’m also using 128x32 so that should work. You need to change characters.h if you want to change the font size but there are also some places (pretty many) in the sketch where the size is hard coded. Could you show a photo of the problem? Maybe it is something I can fix
-
No, you can’t rotate the nano. It has to be positioned towards the RJ45’s. Maybe I’ll update the pcb’s if I need more. I have 15 of these made so I’m not sure I need any more of them.
-
Max 487 Hub, Question for Craig S SteenosMT since you are using the my boards you can’t wire the RJ45 exactly as CraigS did. You need to follow the pinout I put in the Dropbox folder and/or using the diagram I sent you in Slack. It will not work otherwise.
-
Cool I realized that I should have turned the nano 180 degrees. Now it is colliding with the RJ45 contacts. It works but is annoying. Your PCB’s looks slightly different from mine... mine have my name on them ;-)
-
It’s just as easy to save as an stl in Fusion 360. I’ve never used Solidworks but Fusion 360 has one tiny advantage... the price :-)
-
Can you please share the solidworks files? I'm also looking for some knobs
-
Download Fusion 360. It should be able to import Solidworks files and can export STL-files
-
Middlefart’s A-10 build I have gotten some requests for my PCB's. I've put them up on DropBox. https://www.dropbox.com/sh/mvq1unpin486cq2/AABHh8ZgI4w9O59qV5Jn6Ogya?dl=0 They are created in Fritzing, so you need to get that. It was free when I started using it but now it costs $8 https://fritzing.org/download/ Note that the Nano-board is not tested yet. I'll add a list of components later. But I'ts really not much. Some RJ45 contacts, MAX487 Chip, 220Ohm resistors and a trim potentiometer of your choice :) In the dropbox folder there is also a RJ45 Pinout. You need to create some sort of main board where you can connect all cards to eachother and provide them with Ground and +5V. +12 V is not being used at the moment but can be provided for future use. The Nano and the Engline Cluster boards have 2 RJ45 connectors so that they can be daisy chained.
-
Tack! [emoji3]
-
Its getting along [emoji16] I’ve started with the left console. Ordered 2 Leo Bodnar BBI-64 for the inputs but they where broken upon arrival. They sent me new ones and I managed to repair the 2 first ones so now I have 4 [emoji16]
-
Main tripple screen plus 3x export to MFDs "issue"?!
Middlefart replied to xoxen's topic in PC Hardware and Related Software
Cool! Thats solves my problem with running separate MFCD's and RWR -
Main tripple screen plus 3x export to MFDs "issue"?!
Middlefart replied to xoxen's topic in PC Hardware and Related Software
Do i understand this correctly? With a triplehead2go you can get 6 screens from one card? 3 connected to the card directly and 3 others connected through the triplehead2go on a fourth port on the graphics card using only for ports in total? That would solve all of my problems. -
Middlefart’s A-10 build Sorry about the delay but I've finally have the sketch you asked for if you look in the post prior to his one.
-
I couldn't go to sleep before I fixed the problem :) Finally got it working! To create the characters i wrote a C# program that analysed a bitmap of the digits with font MS 33558 and generated the char array in characters.h :thumbup: Below are the two files needed for the sketch. There are some comments in it but most of it is uncommented. Sorry :music_whistling: characters.h static const unsigned char PROGMEM c24_0[] = { B00000000, B00111100, B00000000, B00000000, B11111111, B00000000, B00000001, B11111111, B10000000, B00000011, B11111111, B11000000, B00000111, B11111111, B11100000, B00000111, B11000011, B11100000, B00001111, B10000001, B11110000, B00001111, B10000001, B11110000, B00011111, B00000000, B11111000, B00011111, B00000000, B11111000, B00011110, B00000000, B01111000, B00011110, B00000000, B01111000, B00111110, B00000000, B01111100, B00111110, B00000000, B01111100, B00111110, B00000000, B01111100, B00111110, B00000000, B01111100, B00111110, B00000000, B01111100, B00111110, B00000000, B01111100, B00111110, B00000000, B01111100, B00111110, B00000000, B01111100, B00011110, B00000000, B01111000, B00011110, B00000000, B01111000, B00011111, B00000000, B11111000, B00011111, B00000000, B11111000, B00001111, B10000001, B11110000, B00001111, B10000001, B11110000, B00000111, B11000011, B11100000, B00000111, B11111111, B11100000, B00000011, B11111111, B11000000, B00000001, B11111111, B10000000, B00000000, B11111111, B00000000, B00000000, B00111100, B00000000}; static const unsigned char PROGMEM c24_1[] = { B00000000, B00111000, B00000000, B00000000, B01111100, B00000000, B00000000, B01111100, B00000000, B00000000, B01111100, B00000000, B00000000, B01111100, B00000000, B00000000, B01111100, B00000000, B00000000, B01111100, B00000000, B00000000, B01111100, B00000000, B00000000, B01111100, B00000000, B00000000, B01111100, B00000000, B00000000, B01111100, B00000000, B00000000, B01111100, B00000000, B00000000, B01111100, B00000000, B00000000, B01111100, B00000000, B00000000, B01111100, B00000000, B00000000, B01111100, B00000000, B00000000, B01111100, B00000000, B00000000, B01111100, B00000000, B00000000, B01111100, B00000000, B00000000, B01111100, B00000000, B00000000, B01111100, B00000000, B00000000, B01111100, B00000000, B00000000, B01111100, B00000000, B00000000, B01111100, B00000000, B00000000, B01111100, B00000000, B00000000, B01111100, B00000000, B00000000, B01111100, B00000000, B00000000, B01111100, B00000000, B00000000, B01111100, B00000000, B00000000, B01111100, B00000000, B00000000, B01111100, B00000000, B00000000, B00111000, B00000000}; static const unsigned char PROGMEM c24_2[] = { B00000000, B01111111, B10000000, B00000001, B11111111, B11100000, B00000011, B11111111, B11110000, B00000111, B11111111, B11111000, B00000111, B11110011, B11111000, B00001111, B11000000, B11111000, B00001111, B10000000, B01111100, B00001111, B10000000, B01111100, B00001111, B10000000, B01111100, B00001111, B10000000, B01111100, B00000111, B00000000, B01111100, B00000000, B00000000, B11111000, B00000000, B00000001, B11111000, B00000000, B00000011, B11110000, B00000000, B00001111, B11100000, B00000000, B00111111, B11000000, B00000000, B01111111, B10000000, B00000000, B11111111, B00000000, B00000001, B11111100, B00000000, B00000011, B11110000, B00000000, B00000111, B11100000, B00000000, B00000111, B11000000, B00000000, B00001111, B11000000, B00000000, B00001111, B10000000, B00000000, B00011111, B00000000, B00000000, B00011111, B00000000, B00000000, B00011110, B00000000, B00000000, B00111111, B11111111, B11111000, B00111111, B11111111, B11111100, B00111111, B11111111, B11111100, B00111111, B11111111, B11111100, B00011111, B11111111, B11111000}; static const unsigned char PROGMEM c24_3[] = { B00001111, B11111111, B11100000, B00011111, B11111111, B11110000, B00011111, B11111111, B11110000, B00001111, B11111111, B11100000, B00000000, B00001111, B11100000, B00000000, B00001111, B11000000, B00000000, B00011111, B10000000, B00000000, B00111111, B00000000, B00000000, B00111110, B00000000, B00000000, B01111110, B00000000, B00000000, B11111100, B00000000, B00000001, B11111111, B00000000, B00000001, B11111111, B10000000, B00000001, B11111111, B11100000, B00000001, B11111111, B11110000, B00000000, B00000011, B11110000, B00000000, B00000001, B11111000, B00000000, B00000000, B11111000, B00000000, B00000000, B01111100, B00000000, B00000000, B01111100, B00000000, B00000000, B00111100, B00111100, B00000000, B00111100, B00111100, B00000000, B01111100, B00111110, B00000000, B01111100, B00111110, B00000000, B01111100, B00011111, B00000000, B11111000, B00011111, B10000001, B11111000, B00001111, B11100111, B11110000, B00000111, B11111111, B11100000, B00000011, B11111111, B11000000, B00000001, B11111111, B10000000, B00000000, B01111110, B00000000}; static const unsigned char PROGMEM c24_4[] = { B00000000, B01110000, B00000000, B00000000, B11111000, B00000000, B00000000, B11111000, B00000000, B00000001, B11111000, B00000000, B00000001, B11111000, B00000000, B00000001, B11110000, B00000000, B00000011, B11110000, B00000000, B00000011, B11110000, B00000000, B00000011, B11100000, B00000000, B00000111, B11100000, B00000000, B00000111, B11100000, B00000000, B00000111, B11000000, B00000000, B00000111, B11000000, B00000000, B00001111, B11000011, B10000000, B00001111, B10000111, B11000000, B00001111, B10000111, B11000000, B00011111, B10000111, B11000000, B00011111, B00000111, B11000000, B00011111, B00000111, B11000000, B00111111, B00000111, B11000000, B00111110, B00000111, B11000000, B00111110, B00000111, B11000000, B01111111, B11111111, B11111100, B01111111, B11111111, B11111110, B01111111, B11111111, B11111110, B01111111, B11111111, B11111110, B00111111, B11111111, B11111100, B00000000, B00000111, B11000000, B00000000, B00000111, B11000000, B00000000, B00000111, B11000000, B00000000, B00000111, B11000000, B00000000, B00000011, B10000000}; static const unsigned char PROGMEM c24_5[] = { B00001111, B11111111, B10000000, B00011111, B11111111, B11000000, B00011111, B11111111, B11000000, B00011111, B11111111, B11000000, B00011111, B11111111, B10000000, B00011111, B00000000, B00000000, B00011111, B00000000, B00000000, B00011111, B00000000, B00000000, B00011111, B00000000, B00000000, B00011111, B00000000, B00000000, B00011111, B00000000, B00000000, B00011111, B11111110, B00000000, B00011111, B11111111, B10000000, B00011111, B11111111, B11000000, B00011111, B11111111, B11100000, B00011111, B10000111, B11110000, B00001110, B00000001, B11111000, B00000000, B00000000, B11111000, B00000000, B00000000, B01111100, B00000000, B00000000, B01111100, B00000000, B00000000, B00111100, B00000000, B00000000, B00111100, B00000000, B00000000, B00111100, B00000000, B00000000, B01111100, B00011000, B00000000, B01111100, B00111100, B00000000, B11111000, B00111111, B00000001, B11111000, B00111111, B11000111, B11110000, B00011111, B11111111, B11100000, B00001111, B11111111, B11000000, B00000011, B11111111, B10000000, B00000000, B11111110, B00000000}; static const unsigned char PROGMEM c24_6[] = { B00000000, B00000111, B00000000, B00000000, B00001111, B10000000, B00000000, B00011111, B10000000, B00000000, B00111111, B00000000, B00000000, B01111110, B00000000, B00000000, B11111100, B00000000, B00000001, B11111000, B00000000, B00000011, B11110000, B00000000, B00000111, B11100000, B00000000, B00000111, B11000000, B00000000, B00001111, B10000000, B00000000, B00001111, B11111110, B00000000, B00011111, B11111111, B10000000, B00011111, B11111111, B11000000, B00111111, B11111111, B11100000, B00111111, B11000111, B11110000, B00111111, B00000001, B11111000, B01111110, B00000000, B11111000, B01111100, B00000000, B01111100, B01111100, B00000000, B01111100, B01111000, B00000000, B00111100, B01111000, B00000000, B00111100, B01111000, B00000000, B00111100, B01111100, B00000000, B01111100, B01111100, B00000000, B01111100, B00111110, B00000000, B11111000, B00111111, B00000001, B11111000, B00011111, B11000111, B11110000, B00001111, B11111111, B11100000, B00000111, B11111111, B11000000, B00000011, B11111111, B10000000, B00000000, B11111110, B00000000}; static const unsigned char PROGMEM c24_7[] = { B00001111, B11111111, B11110000, B00011111, B11111111, B11111000, B00011111, B11111111, B11111000, B00011111, B11111111, B11111000, B00001111, B11111111, B11111000, B00000000, B00000001, B11110000, B00000000, B00000001, B11110000, B00000000, B00000011, B11110000, B00000000, B00000011, B11100000, B00000000, B00000011, B11100000, B00000000, B00000111, B11100000, B00000000, B00000111, B11000000, B00000000, B00000111, B11000000, B00000000, B00001111, B11000000, B00000000, B00001111, B10000000, B00000000, B00001111, B10000000, B00000000, B00011111, B10000000, B00000000, B00011111, B00000000, B00000000, B00011111, B00000000, B00000000, B00111111, B00000000, B00000000, B00111110, B00000000, B00000000, B00111110, B00000000, B00000000, B01111110, B00000000, B00000000, B01111100, B00000000, B00000000, B01111100, B00000000, B00000000, B11111100, B00000000, B00000000, B11111000, B00000000, B00000000, B11111000, B00000000, B00000001, B11111000, B00000000, B00000001, B11110000, B00000000, B00000001, B11110000, B00000000, B00000000, B11100000, B00000000}; static const unsigned char PROGMEM c24_8[] = { B00000000, B01111110, B00000000, B00000001, B11111111, B10000000, B00000011, B11111111, B11000000, B00000111, B11111111, B11100000, B00001111, B11100111, B11110000, B00001111, B10000001, B11110000, B00011111, B00000000, B11111000, B00011111, B00000000, B11111000, B00011110, B00000000, B01111000, B00011110, B00000000, B01111000, B00011111, B00000000, B11111000, B00011111, B00000000, B11111000, B00001111, B10000001, B11110000, B00001111, B11100111, B11110000, B00000111, B11111111, B11100000, B00000011, B11111111, B11000000, B00000011, B11111111, B11000000, B00000111, B11111111, B11100000, B00001111, B11100111, B11110000, B00001111, B10000001, B11110000, B00011111, B00000000, B11111000, B00011111, B00000000, B11111000, B00011110, B00000000, B01111000, B00011110, B00000000, B01111000, B00011111, B00000000, B11111000, B00011111, B00000000, B11111000, B00001111, B10000001, B11110000, B00001111, B11100111, B11110000, B00000111, B11111111, B11100000, B00000011, B11111111, B11000000, B00000001, B11111111, B10000000, B00000000, B01111110, B00000000}; static const unsigned char PROGMEM c24_9[] = { B00000000, B11111110, B00000000, B00000011, B11111111, B10000000, B00000111, B11111111, B11000000, B00001111, B11111111, B11100000, B00011111, B11000111, B11110000, B00111111, B00000001, B11111000, B00111110, B00000000, B11111000, B01111100, B00000000, B01111100, B01111100, B00000000, B01111100, B01111000, B00000000, B00111100, B01111000, B00000000, B00111100, B01111000, B00000000, B00111100, B01111100, B00000000, B01111100, B01111100, B00000000, B01111100, B00111110, B00000000, B11111100, B00111111, B00000001, B11111000, B00011111, B11000111, B11111000, B00001111, B11111111, B11110000, B00000111, B11111111, B11110000, B00000011, B11111111, B11100000, B00000000, B11111111, B11100000, B00000000, B00001111, B11000000, B00000000, B00001111, B10000000, B00000000, B00011111, B10000000, B00000000, B00111111, B00000000, B00000000, B11111110, B00000000, B00000001, B11111100, B00000000, B00000111, B11111000, B00000000, B00001111, B11110000, B00000000, B00011111, B11000000, B00000000, B00011111, B10000000, B00000000, B00001110, B00000000, B00000000}; static const unsigned char PROGMEM c24_Empty[] = { B00111000, B00001111, B11000000, B00111100, B00000111, B11100000, B00111110, B00000011, B11110000, B00111111, B00000001, B11111000, B00011111, B10000000, B11111100, B00001111, B11000000, B01111100, B00000111, B11100000, B00111100, B00000011, B11110000, B00011100, B00000001, B11111000, B00001100, B00000000, B11111100, B00000100, B00000000, B01111110, B00000000, B00100000, B00111111, B00000000, B00110000, B00011111, B10000000, B00111000, B00001111, B11000000, B00111100, B00000111, B11100000, B00111110, B00000011, B11110000, B00111111, B00000001, B11111000, B00011111, B10000000, B11111100, B00001111, B11000000, B01111100, B00000111, B11100000, B00111100, B00000011, B11110000, B00011100, B00000001, B11111000, B00001100, B00000000, B11111100, B00000100, B00000000, B01111110, B00000000, B00100000, B00111111, B00000000, B00110000, B00011111, B10000000, B00111000, B00001111, B11000000, B00111100, B00000111, B11100000, B00111110, B00000011, B11110000, B00111111, B00000001, B11111000, B00011111, B10000000, B11111100, B00001111, B11000000, B01111100 }; static const unsigned char PROGMEM c16_0[] = { B00000011, B11000000, B00000111, B11100000, B00001111, B11110000, B00011111, B11111000, B00011110, B01111000, B00111100, B00111100, B00111000, B00011100, B01111000, B00011110, B01110000, B00001110, B01110000, B00001110, B01110000, B00001110, B01110000, B00001110, B01110000, B00001110, B01110000, B00001110, B01110000, B00001110, B01110000, B00001110, B01111000, B00011110, B00111000, B00011100, B00111100, B00111100, B00011110, B01111000, B00011111, B11111000, B00001111, B11110000, B00000111, B11100000, B00000011, B11000000 }; static const unsigned char PROGMEM c16_1[] = { B00000001, B10000000, B00000011, B11000000, B00000011, B11000000, B00000011, B11000000, B00000011, B11000000, B00000011, B11000000, B00000011, B11000000, B00000011, B11000000, B00000011, B11000000, B00000011, B11000000, B00000011, B11000000, B00000011, B11000000, B00000011, B11000000, B00000011, B11000000, B00000011, B11000000, B00000011, B11000000, B00000011, B11000000, B00000011, B11000000, B00000011, B11000000, B00000011, B11000000, B00000011, B11000000, B00000011, B11000000, B00000011, B11000000, B00000001, B10000000 }; static const unsigned char PROGMEM c16_2[] = { B00000011, B11110000, B00001111, B11111000, B00011111, B11111100, B00011110, B00111110, B00111100, B00011110, B00111000, B00001111, B00111000, B00001111, B00010000, B00001111, B00000000, B00011110, B00000000, B00111110, B00000000, B01111100, B00000001, B11111000, B00000011, B11110000, B00000111, B11100000, B00001111, B10000000, B00011111, B00000000, B00111110, B00000000, B00111100, B00000000, B01111100, B00000000, B01111000, B00000000, B11111111, B11111100, B11111111, B11111110, B11111111, B11111110, B01111111, B11111100 }; static const unsigned char PROGMEM c16_3[] = { B00111111, B11111000, B01111111, B11111100, B01111111, B11111000, B00111111, B11111000, B00000000, B11110000, B00000001, B11100000, B00000011, B11000000, B00000111, B10000000, B00001111, B11100000, B00001111, B11110000, B00001111, B11111000, B00000000, B01111100, B00000000, B00111100, B00000000, B00011110, B00000000, B00011110, B00000000, B00001110, B11100000, B00001110, B11110000, B00001110, B11110000, B00011110, B01111000, B00111100, B01111100, B01111100, B00111111, B11111000, B00011111, B11110000, B00001111, B11100000 }; static const unsigned char PROGMEM c16_4[] = { B00000001, B10000000, B00000011, B11000000, B00000011, B11000000, B00000111, B11000000, B00000111, B10000000, B00000111, B10000000, B00001111, B10000000, B00001111, B00000000, B00001111, B00000000, B00011111, B00000000, B00011110, B00110000, B00011110, B01111000, B00111110, B01111000, B00111100, B01111000, B00111100, B01111000, B01111100, B01111000, B01111111, B11111110, B01111111, B11111111, B01111111, B11111111, B00111111, B11111110, B00000000, B01111000, B00000000, B01111000, B00000000, B01111000, B00000000, B00110000 }; static const unsigned char PROGMEM c16_5[] = { B00111111, B11100000, B01111111, B11110000, B01111111, B11110000, B01111111, B11100000, B01110000, B00000000, B01110000, B00000000, B01110000, B00000000, B01110000, B00000000, B01111111, B11100000, B01111111, B11110000, B01111111, B11111000, B01111000, B01111100, B00110000, B00111110, B00000000, B00011110, B00000000, B00001110, B00000000, B00001110, B00000000, B00001110, B00000000, B00001110, B01110000, B00011110, B01111000, B00111100, B01111100, B01111100, B00111111, B11111000, B00011111, B11110000, B00001111, B11100000 }; static const unsigned char PROGMEM c16_6[] = { B00000000, B11100000, B00000001, B11110000, B00000011, B11100000, B00000111, B11000000, B00001111, B10000000, B00011111, B00000000, B00011110, B00000000, B00111100, B00000000, B00111111, B11000000, B01111111, B11110000, B01111111, B11111000, B11111100, B01111100, B11111000, B00111100, B11110000, B00011110, B11100000, B00001110, B11100000, B00001110, B11100000, B00001110, B11100000, B00001110, B11110000, B00011110, B01111000, B00111100, B01111100, B01111100, B00111111, B11111000, B00011111, B11110000, B00000111, B11000000 }; static const unsigned char PROGMEM c16_7[] = { B00111111, B11111100, B01111111, B11111110, B01111111, B11111110, B00111111, B11111100, B00000000, B00111100, B00000000, B00111100, B00000000, B01111000, B00000000, B01111000, B00000000, B01111000, B00000000, B11110000, B00000000, B11110000, B00000000, B11110000, B00000001, B11100000, B00000001, B11100000, B00000001, B11100000, B00000011, B11000000, B00000011, B11000000, B00000011, B11000000, B00000111, B10000000, B00000111, B10000000, B00000111, B10000000, B00001111, B00000000, B00001111, B00000000, B00000110, B00000000 }; static const unsigned char PROGMEM c16_8[] = { B00000111, B11100000, B00001111, B11110000, B00011111, B11111000, B00111110, B01111100, B01111000, B00011110, B01111000, B00011110, B01110000, B00001110, B01110000, B00001110, B01111000, B00011110, B00111000, B00011100, B00111110, B01111100, B00011111, B11111000, B00011111, B11111000, B00111110, B01111100, B00111000, B00011100, B01111000, B00011110, B01110000, B00001110, B01110000, B00001110, B01111000, B00011110, B01111000, B00011110, B00111110, B01111100, B00011111, B11111000, B00001111, B11110000, B00000111, B11100000 }; static const unsigned char PROGMEM c16_9[] = { B00000111, B11000000, B00011111, B11110000, B00111111, B11111000, B01111100, B01111100, B01111000, B00111100, B11110000, B00011110, B11100000, B00001110, B11100000, B00001110, B11100000, B00001110, B11100000, B00001110, B11110000, B00011110, B01111000, B00111110, B01111100, B01111100, B00111111, B11111100, B00011111, B11111000, B00000111, B11111000, B00000000, B11110000, B00000001, B11110000, B00000011, B11100000, B00000111, B11000000, B00001111, B10000000, B00011111, B00000000, B00111110, B00000000, B00111100, B00000000 }; static const unsigned char PROGMEM c16_Empty[] = { B00110000, B01111100, B00111000, B00111100, B00111100, B00011100, B00111110, B00001100, B00011111, B00000100, B00001111, B10000000, B00000111, B11000000, B00000011, B11100000, B00000001, B11110000, B00100000, B11111000, B00110000, B01111100, B00111000, B00111100, B00111100, B00011100, B00111110, B00001100, B00011111, B00000100, B00001111, B10000000, B00000111, B11000000, B00000011, B11100000, B00000001, B11110000, B00100000, B11111000, B00110000, B01111100, B00111000, B00111100, B00111100, B00011100, B00111110, B00001100 }; Displays.ino #define DCSBIOS_DEFAULT_SERIAL #include "DcsBios.h" #include <SPI.h> #include <Wire.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> #include "characters.h" #define SCREEN_WIDTH 128 // OLED display width, in pixels #define SCREEN_HEIGHT 32 // OLED display height, in pixels #define OLED_RESET 4 // Reset pin # (or -1 if sharing Arduino reset pin) //Comment for barometric pressure #define ALTIMETER int updateInterval = 100; //the number of milliseconds between updates struct scrollDigit { int digit; //The digit that is displayed int y; // The vertical position of the digit }; struct disp { Adafruit_SSD1306 display; int width; int numberOfDigits; scrollDigit digits[5]; }; #ifdef ALTIMETER disp oled = {Adafruit_SSD1306(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET), 24, 5, {{0,0},{0,0},{0,0},{0,0},{0,0}}}; #else disp oled = {Adafruit_SSD1306(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET), 16, 4, {{0,0},{0,0},{0,0},{0,0},{0,0}}}; #endif void setup() { if(!oled.display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) { // Address 0x3C for 128x32 for(;;); // Don't proceed, loop forever } DcsBios::setup(); } void UpdateDisplay() { oled.display.clearDisplay(); for (int i = 0; i < oled.numberOfDigits; i++) { printScrollingDigit(oled.digits[i].digit, oled.width, oled.digits[i].y, i + 1, &oled); } //Clear the area below the the numbers if we are using the small font if (oled.width == 16) { oled.display.fillRect(0, 25, 67, 7, BLACK); } oled.display.display(); } int YPos() { return (oled.width + 9) * -1; } void printScrollingDigit(int digit, int width, int y, int pos, disp *oled) { int x = (width * pos) - width + pos; #ifdef ALTIMETER switch (digit) { case -1: oled->display.drawBitmap(x, y, c24_Empty, 24, 32, 1); oled->display.drawBitmap(x, y+33, c24_1, 24, 32, 1); break; case 1: oled->display.drawBitmap(x, y, c24_1, 24, 32, 1); oled->display.drawBitmap(x, y+33, c24_2, 24, 32, 1); break; case 2: oled->display.drawBitmap(x, y, c24_2, 24, 32, 1); oled->display.drawBitmap(x, y+33, c24_3, 24, 32, 1); break; case 3: oled->display.drawBitmap(x, y, c24_3, 24, 32, 1); oled->display.drawBitmap(x, y+33, c24_4, 24, 32, 1); break; case 4: oled->display.drawBitmap(x, y, c24_4, 24, 32, 1); oled->display.drawBitmap(x, y+33, c24_5, 24, 32, 1); break; case 5: oled->display.drawBitmap(x, y, c24_5, 24, 32, 1); oled->display.drawBitmap(x, y+33, c24_6, 24, 32, 1); break; case 6: oled->display.drawBitmap(x, y, c24_6, 24, 32, 1); oled->display.drawBitmap(x, y+33, c24_7, 24, 32, 1); break; case 7: oled->display.drawBitmap(x, y, c24_7, 24, 32, 1); oled->display.drawBitmap(x, y+33, c24_8, 24, 32, 1); break; case 8: oled->display.drawBitmap(x, y, c24_8, 24, 32, 1); oled->display.drawBitmap(x, y+33, c24_9, 24, 32, 1); break; case 9: oled->display.drawBitmap(x, y, c24_9, 24, 32, 1); oled->display.drawBitmap(x, y+33, c24_0, 24, 32, 1); break; default: oled->display.drawBitmap(x, y, c24_0, 24, 32, 1); oled->display.drawBitmap(x, y+33, c24_1, 24, 32, 1); break; } #else switch (digit) { case -1: oled->display.drawBitmap(x, y, c16_Empty, 16, 24, 1); oled->display.drawBitmap(x, y+25, c16_1, 16, 24, 1); break; case 1: oled->display.drawBitmap(x, y, c16_1, 16, 24, 1); oled->display.drawBitmap(x, y+25, c16_2, 16, 24, 1); break; case 2: oled->display.drawBitmap(x, y, c16_2, 16, 24, 1); oled->display.drawBitmap(x, y+25, c16_3, 16, 24, 1); break; case 3: oled->display.drawBitmap(x, y, c16_3, 16, 24, 1); oled->display.drawBitmap(x, y+25, c16_4, 16, 24, 1); break; case 4: oled->display.drawBitmap(x, y, c16_4, 16, 24, 1); oled->display.drawBitmap(x, y+25, c16_5, 16, 24, 1); break; case 5: oled->display.drawBitmap(x, y, c16_5, 16, 24, 1); oled->display.drawBitmap(x, y+25, c16_6, 16, 24, 1); break; case 6: oled->display.drawBitmap(x, y, c16_6, 16, 24, 1); oled->display.drawBitmap(x, y+25, c16_7, 16, 24, 1); break; case 7: oled->display.drawBitmap(x, y, c16_7, 16, 24, 1); oled->display.drawBitmap(x, y+25, c16_8, 16, 24, 1); break; case 8: oled->display.drawBitmap(x, y, c16_8, 16, 24, 1); oled->display.drawBitmap(x, y+25, c16_9, 16, 24, 1); break; case 9: oled->display.drawBitmap(x, y, c16_9, 16, 24, 1); oled->display.drawBitmap(x, y+25, c16_0, 16, 24, 1); break; default: oled->display.drawBitmap(x, y, c16_0, 16, 24, 1); oled->display.drawBitmap(x, y+25, c16_1, 16, 24, 1); break; } #endif } #ifdef ALTIMETER void onAlt10000FtChange(unsigned int newValue) { if (newValue == 6553) { oled.digits[0].digit = 1; oled.digits[0].y = 0; } else if (newValue == 0) { oled.digits[0].digit = -1; oled.digits[0].y = 0; } else { oled.digits[0].digit = -1; oled.digits[0].y = map(newValue, 0, 6553, 0, YPos()); } } void onAlt1000FtChange(unsigned int newValue) { unsigned int mappedValue = newValue / 6553; unsigned int y = map(newValue, mappedValue * 6553, mappedValue * 6553 + 6553, 0, YPos()); oled.digits[1].digit = mappedValue; oled.digits[1].y = y; } void onAlt100FtChange(unsigned int newValue) { unsigned int mappedValue = newValue / 6553; unsigned int y = map(newValue, mappedValue * 6553, mappedValue * 6553 + 6553, 0, YPos()); oled.digits[2].digit = mappedValue; oled.digits[2].y = y; } DcsBios::IntegerBuffer Alt10000FtBuffer(0x1080, 0xffff, 0, onAlt10000FtChange); DcsBios::IntegerBuffer Alt1000FtBuffer(0x1082, 0xffff, 0, onAlt1000FtChange); DcsBios::IntegerBuffer Alt100FtBuffer(0x1084, 0xffff, 0, onAlt100FtChange); #else void onBaro0Change(unsigned int newValue) { unsigned int mappedValue = newValue / 6554; unsigned int y = map(newValue, mappedValue * 6554, mappedValue * 6554 + 6554, 0, YPos()); oled.digits[3].digit = mappedValue; oled.digits[3].y = y; } void onBaro1Change(unsigned int newValue) { unsigned int mappedValue = newValue / 6554; unsigned int y = map(newValue, mappedValue * 6554, mappedValue * 6554 + 6554, 0, YPos()); oled.digits[2].digit = mappedValue; oled.digits[2].y = y; } void onBaro2Change(unsigned int newValue) { unsigned int mappedValue = newValue / 6554; unsigned int y = map(newValue, mappedValue * 6554, mappedValue * 6554 + 6554, 0, YPos()); oled.digits[1].digit = mappedValue; oled.digits[1].y = y; } void onBaro3Change(unsigned int newValue) { unsigned int mappedValue = newValue / 6554; unsigned int y = map(newValue, mappedValue * 6554, mappedValue * 6554 + 6554, 0, YPos()); oled.digits[0].digit = mappedValue; oled.digits[0].y = y; } DcsBios::IntegerBuffer Baro0Buffer(0x1086, 0xffff, 0, onBaro0Change); DcsBios::IntegerBuffer Baro1Buffer(0x1088, 0xffff, 0, onBaro1Change); DcsBios::IntegerBuffer Baro2Buffer(0x108a, 0xffff, 0, onBaro2Change); DcsBios::IntegerBuffer Baro3Buffer(0x108c, 0xffff, 0, onBaro3Change); #endif unsigned long time = 0; void loop() { DcsBios::loop(); time = millis(); if (time % updateInterval == 0) { UpdateDisplay(); } }
-
I have started to put together a sketch that I can share but I have a strange problem with the values from DCS jumping all over the place. Have to look at it tomorrow.
-
Yes it does. Thanks! But it isn’t hard. Just take your time and learn on the way. That’s what I do.
-
Have forgotten about the OLED-sketch. Sorry! Will try to fix it tomorrow and share it.
-
I haven’t forgotten about this. I’ve just ignored it [emoji2957] I need to put together a sketch that can be run on an Arduino and an oled without all my extra stuff. Will try to fix it this weekend.