Before You Buy a Raspberry Pi, Try the Old Android Phone in Your Drawer
An old Android phone already has the parts most first home-lab projects need: Wi-Fi, a screen, a battery and a case. I’d start by asking what the project actually needs, not which board to order. What you want to build Try the phone first if… Pick a board if… Home dashboard A browser tab is enough and you already have a server The device also needs to host the service reliably Local web demo You…
Before purchasing a Raspberry Pi, consider repurposing an old Android phone you may have lying around. These devices already possess essential components such as Wi-Fi, a screen, a battery, and a case. To determine if an old phone suits your project, first, ascertain the specific requirements of your endeavor. If a simple browser tab is sufficient and a server is already in place, an Android phone may serve as a viable alternative.
For testing a page from another device, ensure the phone possesses built-in sensor inputs. Should the project necessitate GPIO connections for external sensors, buttons, or relays, then a Raspberry Pi is likely a more suitable choice.
A brief local web demo can be achieved by setting up a development server on a supported Android device with Termux. Create a fresh folder, install Python, and initiate the server by navigating to the folder and executing the command: `python -m http.server 8000 --bind PHONE_LAN_IP`. Replace `PHONE_LAN_IP` with the internal IP address of the phone. Access the page from another device on the same network by entering `http://PHONE_LAN_IP:8000` into the browser. Terminate the server with Ctrl+C upon completion.
This testing process should be carried out without port forwarding, as it is intended for temporary LAN usage. Should the page cease to respond upon locking the screen, the phone’s capabilities might be more limited than initially thought. Repeating the test with the screen turned off can provide further insight into the phone's performance during prolonged use.
Ultimately, before investing in a Raspberry Pi, conduct a single real job for an afternoon to gauge the phone’s suitability. If the phone successfully completes the task, it might be a practical solution. However, if additional features like wired hardware, unattended restarts, or reliable background processes are required, a Raspberry Pi would be a more appropriate investment.
It is crucial to avoid using phones with swollen or damaged batteries and to select devices that still receive security updates for networked projects.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to