It's Alive! (Mostly)

I got my Pi in the mail this week and I was really excited to put it all together. The touch screen was v1.2, and it was half assembled as I didn't have to do the ribbons to the screens logic board, nor attach it to the Pi. All I had to do was attach my Pi to the rails, link it to the logic board, and put it in a case.


There are a few gotcha's with this set up. First, the screen was upside down. Who ever made the case should have put the port cutouts on the other side. So I had to to put this line in my boot config file.

lcd_rotate=2
It's still upside down in post, but once it loads the OS, it's correct. There is a hole page on how to get the screen to behave how you want it here if you got the same screen. One thing I'm trying to figure out is how to cancel signal to the screen if the HDMI cord is plugged in to a TV. Basically, was hoping that it would act like a Nintendo Switch where if it detected HDMI, the screen would change to the HDMI out.

Another thing is that the PSU included in the kit doesn't fully power the Pi with the screen. It's 5V, 2.5A but I still get a bolt icon. I detached the screen, and plugged the PI to my TV and I got no bolt with just the PI. With the screen, I could only get it to go away by adjusting the clock down to 200mhz, but it was really slow.

I ordered the official PSU along with another PI. Buying the PSU alone on Amazon was gonna cost me $18, another $17 in shipping which I would have to wait 2 weeks for, and I'm sure I'd would be taxed on top of it. It made much more sense to pay $56 for a kit that comes with the official PSU, and it'll be here next week with $9 shipping. It's not like that PI will be a waste. These computers have many uses!

For now, I just ignore the bolt icon with:
avoid_warnings=1
If the official PSU still gives me the bolt, keeping the ignore flag set.
 
Setting up SDL2 on it was easy. I thought I would have to build the source The difference between the Linux build and the Pi build is that the Pi build is configured differently to use OpenGL ES and other stuff. But thankfully, their build bot builds one for you every commit. I was able to just download a pre-built one, set up environments, and copy the so file to the /lib directory.

What's awesome is that CodeBlocks works on the PI, so I don't need to use make files! CodeBlocks uses a readable XML format for projects. I actually made a project maker using pugi a while back. If I install the libraries correctly, I can have one cbp file for both Linux and the PI. No separate Projects for different platforms!

With that being said, I'm probably not gonna do a Windows build; at least for now. There are hundreds of 2D engines available on the platform, and this engine is made for the PI (and maybe the CHIP). Most people on Windows grab Visual Studio over CodeBlocks, and I'd have to make a separate cbp file for it, so might as well make a VS project. Might make a Windows build, but right now, it's not a focus right now. Window's is less of a pain when it comes to file names and library lookups so it'll be a piece of cake if the time ever comes.

I'm going to fix my SDL2 installation, and set up my project. My goal tonight is to get a "Hello World" up. I might have to rearrange my desk to make developing less cluttered before I do anything! I have my Windows PC and my Linux Machine hooked to the same display, and I have to move keyboards and mice around when I want to switch computers for the day. Sometimes I want to boot into Windows, other times I want to boot into my slick Linux machine! I wish I had room for another computer setup.

Comments