MrMalto4

New Member
Hello again everyone!

Why it certainly has been some time since I last posted anything here, but I am here now to let you all know how my last project -- Working Pip-Boy 2000 MK VI -- is going.

So we last left things off with a Pip-Boy 2000 Mk VI model (by The Wand Company) quite heavily modified, such that a BlackBerry Passport can be inserted and removed easily, without having to take apart or modify the actual BlackBerry.

I then started working on my PipDroid APK (v1.0.0.11 being the last version I implemented), where my main objective was to have a customizable Pip-Boy interface for the BlackBerry, where I could add new features as I saw fit, while trying to keep it as "realistic" to the in-game interface as possible.

And with this, I was happy, content even, now that I had my "highly realistic" Pip-Boy with "in-game interface", I didn't feel like I needed to add much more, at the time at least.

Flash forward to around 3 weeks ago, I got an Instagram message from someone who enjoyed reading about the project, and wanted to know how it was going, and more importantly, if it was available for download.
I responded saying that the project was on hiatus due to a "lack of motivation" or "lack of ideas" on how to improve it, and that I felt that I would only share the APK once I felt like it was more polished.

With this, the project was back on my mind, and I started thinking about what things I could add, how I could make it a better APP, what things I felt were off, etc.
And then it hit me, an idea on how to implement the whole STATS, ITEMS and DATA interface of the Pip-Boy, in such a way that didn't feel "too against" the original in-game look, PLUS a way to actually change menus using the physical buttons on the Pip-boy 2000.

With this, I recovered a backup of my PipDroid APK project folder, went to start looking over the code and comments (after around 2 years of not using Android Studio), and Oh... its an old backup (v1.0.0.3 or so).
"No worries" I thought, "I must have a more recent backup of the project..." oh how naive I was...

So there I was, with a very old version of my APK Project, hardly any experience again on how to program Kotlin, and a dream. So I started getting used to the project again, using the comments that I left in the project to try and remember why I did things a certain way, and after two weeks of coding, here we are:

### PipDroid v2.0.0.6 (beta)
PipDroid | Functional Pip-Boy Android APP


So this new version of the APP contains all of the Menus (STATS, ITEMS and DATA) along with all the sub-menus (although they are not all completed - more on that later).

I started with the STATS menu, plus designing the SETTINGS menu, which I would decide to implement on all menus (STATS, ITEMS and DATA). Doing this would allow the user to both change settings wherever on the APP, but also allow for the actual changing of menu.

I decided leaving PLACEHOLDERs in this menu as a way to remind myself to continue adding functionalities, such that the APP feels a lot more "flexible" (for example, all the values for SPECIALS, Skills, etc. are "static", but it would be nice to be able to modify these in an easy way).

Once I had STATS and SETTINGS, I moved onto ITEMS, which was probably the easiest menu to complete, seeing as most all sub-menus are the same. I still need to add more items to "flesh out" these sub-menus, but for now I am happy with how they look.
I want to implement a way to "equip weapons" and "wear armour", such that they appear as "toggled", but this requires quite a bit more coding, which as of now I have decided to "leave it as an improvement" to be able to focus on other parts.

Finally, we have DATA, which was both my favourite and my most hated menu :/
Local Map, World Map and Quests are all pending, mostly because I don't know what to do with both Local Map and World Map.
Part of me wants to have the APP use location or access to OpenStreetMap for a more "useful" function, but another part of me wants to try and get high-res versions of Fallout 3 and New Vegas maps and view them / view waypoints (Let me know what you would recommend).

Finally was Radio, and man did this take me time to code... we have to check which radio is being played, enable/disable sound on other mediaPlayer objects, generate an Audio Visualizer view depending on the audio being played (making sure it is compatible with API 18 which is what the BlackBerry Passport uses, but also wanting it to be compatible with API 34 for newer/modern phones).

All in all, I am glad that this part is done and I don't have to continue coding it hahaha

So that is practically all that has been implemented so far, but I wanted to leave you all with the ideas that I still have for this project, and also wanted your suggestions for possible implementations/changes.
  • Implement Local Map + World Map sub-menus
    • Either using Fallout 3/NV in-game maps with waypoints, or using OpenStreetView for a more real usage (or both, where Local Map could be the games, and World Map could be OpenStreetView)
  • Implement STATS-Status "hurt" and "healing" functions (show damaged limbs and heal with Stimpaks)
  • Finish adding colours to APP (UI Colours)
  • Add aditional settings/flexibility to APP (view possible way to add/change weapons/apparel/etc.)

And possibly the biggest change I have in mind, is a way to add actual working buttons to the Pip-boy 2000 kit, and have them interract with the APP using Bluetooth. I currently plan on using an ESP32 board for this, but am looking at other options/alternatives.

So there we have it, the APP is quite a bit more fleshed out in comparison to last time, but I feel there is still a fair bit to go.

Thanks to all for reading this far!

- James
 
Hey there everyone,

Quite a lot has happened since my last post here, most notibly, PipDroid is now fully available on the Google Play Store, so all of you can use it with your Fallout Cosplays, for an extra added bit of realism.

That being said, for even more realism, I implemented the ESP32 board with Bluetooth to be able to interact with the APP, so that you could change Menu without using the Settings menu, so this post is mainly about this feature. Here I will explain the code used, how it works, what happens on the APP side, and how you can use it too!

So first off, for the people interested in copying what I am using, I bought the LOLIN ESP32 S3 Mini board from Aliexpress, its a nice little board that supports both Bluetooth and Wi-Fi, so I thought it would be great for this project. Once I had the board, I started looking into how to program in Arduino, and honestly, I just gave up. I programmed Arduino during University, but for the life of me just couldn't get on with it for this project, so I looked into installing micropython onto the board. I have always been fond of python, so thought this would be great.

I followed the following tutorial "ESP s3 Mini #2 : Instalamos MicroPython paso a paso." by Cambatronics Online in Spanish, and it was super helpful. There is also the official document in English, although I felt happier "following along".
For those of you who want a very quick run through, you basically have to:

Predownload the following requirements:
- CH340 Driver - CH340 Driver — WEMOS documentation
- Python - Download Python
- esptool - GitHub - espressif/esptool: Espressif SoC serial bootloader utilityS3

Once you have these things prepared, you download the micropython firmware for the ESP32 board: Releases · wemos/micropython

Then, you Flash using esptool (from cmd in Windows) using the following command:
esptool --port PORT_NAME erase_flash
esptool --port PORT_NAME --baud 1000000 write_flash -z 0 FIRMWARE.bin

PORT_NAME is the name of the Serial COM port shown on your PC when you connect the board.
Note** -- Board by default is in "execute mode", to change to load FW mode, hold BOOT, press RESET, let go of RESET, let go of BOOT

Once you have uploaded the Firmware, you can now start to program the board using Micropython. For this, I followed Cambatronics Online's advice, and used Thonny.

With everything prepared, and the board linked, I started looking for bluetooth modules/code to help start with the project, and I found the Micropython Bluetooth Example github, and used the examples as a base.

I have uploaded the files I used, such that you can download it and use it directly with your ESP32 boards. I admit it is VERY barebones, but it does what I need it to (if anyone has any tips to improve upon what I have, by all means let me know).
My main aditions was to the main.py file, mainly the following lines:

Python:
buttonSTATS = Pin(16, Pin.IN, Pin.PULL_UP)
buttonITEMS = Pin(17, Pin.IN, Pin.PULL_UP)
buttonDATA = Pin(18, Pin.IN, Pin.PULL_UP)

_UART_UUID = bluetooth.UUID("6E400001-B5A3-F393-E0A9-E50E24DCCA9E")
_UART_TX = (
    bluetooth.UUID("6E400003-B5A3-F393-E0A9-E50E24DCCA9E"),
    _FLAG_READ | _FLAG_NOTIFY,
)
_UART_RX = (
    bluetooth.UUID("6E400002-B5A3-F393-E0A9-E50E24DCCA9E"),
    _FLAG_WRITE | _FLAG_WRITE_NO_RESPONSE,
)

Here, I specify the PINs I used for the different physical buttons "STATS", "ITEMS" and "DATA".

Then, I modified the "demo" function:

Python:
def demo():
    ble = bluetooth.BLE()
    p = BLESimplePeripheral(ble)

    def on_rx(v):
        formatting = v.decode('utf-8')
        vars.sentVALUE = formatting.strip()
        
    p.on_write(on_rx)

    while True:
        if p.is_connected():
            if buttonSTATS.value() == 0:
                vars.sentVALUE = "STATS"
                p.send(vars.sentVALUE)
            if buttonITEMS.value() == 0:
                vars.sentVALUE = "ITEMS"
                p.send(vars.sentVALUE)
            if buttonDATA.value() == 0:
                vars.sentVALUE = "DATA"
                p.send(vars.sentVALUE)

        print(vars.sentVALUE)
        time.sleep_ms(350)

Here I used very simple code to simply, when a button is pressed, to save the "sentVALUE" to the value sent (either "STATS", "ITEMS" or "DATA") via Bluetooth to the APP.
I also implemented a way to receive the same values from the APP (I originally didn't want the buttons to "send" the same value more than once (if you are on STATS, dont send STATS again), but in the end decided it didn't bother me). This is why I use the "vars.sentVALUE", in order to save the sent VALUE, along with the received VALUE.

With this, that is pretty much all I have on the ESP32 board, as I said, super simple.

Now the APP had to be programmed to be able to connect with the simple Bluetooth device. I used a SERIAL BLUETOOTH APP to debug and see what values were being sent and received, and eventually got everything the way I needed it.

With aaaaaall of this, I made the Bluetooth setup menu. On this menu, you specify the MAC Address of the ESP32 board (you can get this either using the APP mentioned before, or connecting via Bluetooth to the device and checking the MAC), then the UUID values are the ones specified in the main.py code (configurable if you want to change it up). With these values configured, you just connect to the Bluetooth device, and start working!

You can see how this works in my video here - PipDroid | Functional Pip-Boy Android APP, around the 6min mark.

So there you have it, a very brief explanation to how the Bluetooth functionality on PipDroid works, for all of you interested in using it too!

If after this you have any questions, please, ask away ^^

- James
 

Attachments

  • ESP32_S3_Mini_PythonFiles.zip
    4.9 KB · Views: 111
Back
Top