05-27-2021, 03:17 PM
Programming for the PinePhone is just like programming for a typical x86/x64 linux PC except that you have a tiny touch screen, have to use a screen keyboard, you are on ARM64 instead of x86/x64, and the CPU and GPU are puny compared to modern x86/x64 machines.
You can write programs in python. In fact a lot of programs on the PinePhone are written in python for better (faster to get something up and running) or worse (python isn't known for good performance on desktops, so it can struggle a bit on the PinePhone).
If you write programs from an x86/x64 computer in languages that require compilation, you will need to take care to do cross-compilation or you can do the compilation on the PinePhone itself. It is straightforward to install all the compilers in the package databases of each linux distribution and use them. They will take longer to compile, but they will do the job just as good as on a more powerful machine just slower.
You will need to be a bit more mindful of performance and definitely RAM usage than you would on a x86/x64 desktop or laptop of today. If you have done programming for the Raspberry Pi, then your experience with those issues there will carry over here. The PinePhone has more RAM than the Raspberry Pi 3 and earlier and a comparable processor.
As far as sensors, it depends on which sensor you want to access. The IMU and a few other sensors are accessible via the IIO (Industrial Input Output) subsystem of the kernel (use libiio and tools to access). You can also see the devices in /sys as well. One thing to keep in mind, recent PinePhones use a different magnetometer due to pandemic related component shortages.
You can write programs in python. In fact a lot of programs on the PinePhone are written in python for better (faster to get something up and running) or worse (python isn't known for good performance on desktops, so it can struggle a bit on the PinePhone).
If you write programs from an x86/x64 computer in languages that require compilation, you will need to take care to do cross-compilation or you can do the compilation on the PinePhone itself. It is straightforward to install all the compilers in the package databases of each linux distribution and use them. They will take longer to compile, but they will do the job just as good as on a more powerful machine just slower.
You will need to be a bit more mindful of performance and definitely RAM usage than you would on a x86/x64 desktop or laptop of today. If you have done programming for the Raspberry Pi, then your experience with those issues there will carry over here. The PinePhone has more RAM than the Raspberry Pi 3 and earlier and a comparable processor.
As far as sensors, it depends on which sensor you want to access. The IMU and a few other sensors are accessible via the IIO (Industrial Input Output) subsystem of the kernel (use libiio and tools to access). You can also see the devices in /sys as well. One thing to keep in mind, recent PinePhones use a different magnetometer due to pandemic related component shortages.