I just wanted to share an experience with you guys that is somewhat related to this project.
I've had a 2.8" SPI serial TFT screen sitting in my electronics draw for sometime, and as there is nothing (or at least my searches turned up nothing) to support these devices in PBP I opted to get an Arduino Mega and experiment with that, given that there are lots of library files readily available. Now I've never attempted programming in C++ (or the variant the Arduino platform uses) so it was a steep learning curve (learning Klingon may have been simpler). But after a few days had managed to take one of the example files and hack it about to mimic the layout on the GLCD display in my existing vivarium controller project, only better as the display is colour. So what was going to be just an experiment to prove the TFT worked was now developing into a revision of my old PIC based project.
Over the following couple of weeks I had downloaded examples for DS18B20's, DS1307 RTC, etc and with the help of a friend via e-mails adapted them to suit the projects needs. But the road was never smooth and easy. The strange syntax with brackets, semi-colons, and lack of structure like BASIC made things tricky. Simple things like reading the state of a switch and then jumping out of the main loop to a menu seems to be too low level that its complicated to detect the moment the switch is pressed. It ignores what logic would seem to be easy. For example using the included example that lights an LED when the button is pressed, substitute the making of pin high when the button is pressed to print something on the screen and it doesn't work. The biggest headache has been serial communications.... My PIC / PBP project can be updated via serial and a PC application written in Liberty Basic - it works just fine - replicating that in C++ has caused us so much frustration, whether serial ports on the processor are flakey, or there is a timing issues (no DT INT here) we have no idea. I did manage to get reliable communications working, but that was the only thing happening, sending numbers back and forth and updating an array, add in the option of reading a single DS18B20 and displaying text on the TFT and the serial coms become unstable with data missing after transmission. I've used a com sniffer to confirm data movement, and the problem is code related.
So for me it's a shame that PBP hasn't kept pace with things like TFT screens, Ethernet etc. After this experience with C++ I realise how much I love using PBP. Maybe given the input and development of routines by Darrel PBP would have been developed further to cover these items of hardware, but sadly we lost such a wonderful person with so much expertise. I just wish I had the skill and experience to be able to develop PBP include files to use TFTs, GLCDs etc but I'm no where near that talented.
Having messed about with C++ I much prefer PBP and will, where possible, use this as my preferred language.
Bookmarks