Thursday, February 29, 2024

Hacking a 3ds to add parental controls


 

The 3ds is an amazing piece of hardware. Especially if you hack it to add homebrew/emulators.

My son has been enjoying a bit of "free time" before bed, and playing with a generic "mini arcade" game system. The games are all generic knock offs, and I figured he'd love to play with my hacked 3ds which has thousands of high quality games...

The problem is, the 3ds doesn't have "screen time" controls to encourage him to put it down after X minutes so he gets some sleep. So I decided to download the source for the custom firmware I was using (https://github.com/LumaTeam/Luma3DS) and add the controls myself.

Because I wanted the parental controls to pause the game, and allow "sleep" to save his game, I had to add my code to the firmware itself. This lets me spawn a thread that is running in the background, even when a game is running to keep track of time, and screen time limits. I added the ability to call out to my website with the current game he's playing (so in the future if we want to have certain educational games count for less time, we can)

The basic logic is this: Every few seconds it sends the current game he's playing to my sever, which responds with the screen time limit. In order for this to work "offline" if we are not at home/near internet, it has a built in "default" time of 15 minutes. It then writes to a local file every second to keep track of actual screen time usage. Then if the current screen time usage is over the screen time limit, it pauses the OS, and pops up a screen telling him that his screen time is up.

It also has a hint on how to add more screen time (he's learning to read, so if he figures this out on his own, he deserves the bonus screen time) This is also a way for us to add more time if we need locally. We can add screen time via my server as well.

So far its working great, and just about ready for "prime time" (had some issues with the 3ds getting stuck in sleep mode, but I'm just about done with that.

Once I am finished with the code, I'll upload it all to GitHub so other parents can enjoy :)

Code is gross, but functional. I'll be adding more features as I need them. 
https://github.com/spiffomatic64/Luma3DS


Wednesday, December 13, 2023

Tonie Weather

 So my son loves his tonie so much for listening to his favorite shows: blog post about that project here


I thought it would be cool to make one of his tonies tell him the weather for the day. So I threw this script together to generate a "text to speech" weather forecast for the day, and clothing recommendations for him to dress himself.

It runs every day to get the current weather, and uses the hourly high/lows and precipitation data to recommend what to wear. He wakes up in the morning, puts the yeti tonie on the box, and then knows exactly what to wear for the day.

He loves it.




Here is the code: https://github.com/spiffomatic64/tonie_sync/blob/master/tonie_weather.py


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
from noaa_sdk import NOAA
import json
from gtts import gTTS
import shutil
from pprint import pprint
from datetime import datetime, timedelta


def get_temp(temp, low):
    temps = {100: "Very hot, Wear a Tshirt and shorts",
             85: "Hot, Wear a Tshirt and shorts",
             75: "Warm, Wear a Tshirt and shorts",
             65: "Nice, Wear a Tshirt and shorts",
             50: "Cool, Wear a Tshirt and pants",
             40: "Cold, Wear a Long Sleeves shirt and pants",
             30: "Very Cold, Wear a Long Sleeves shirt and pants"}

    for t in temps:
        if temp > t:
            if low < 65:
                temp_data = temps[t].replace("shorts","pants")
            return temp_data


def get_forcast(forecast_data, hourly_data):
    json_formatted_str = json.dumps(forecast_data, indent=2)
    print(json_formatted_str)

    tomorrow = datetime.now() + timedelta(1)
    tomorrow_string = tomorrow.strftime("%Y-%m-%d")
    # print(tomorrow_string)
    max = 0
    min = 100
    for hour_data in hourly_data:
        if hour_data['startTime'][:10] == tomorrow_string:
            hour = int(hour_data['startTime'][11:13])

            if hour > 6 and hour < 17:
                # print(hour)
                if hour_data['temperature'] > max:
                    max = hour_data['temperature']
                if hour_data['temperature'] < min:
                    min = hour_data['temperature']

    print(f"High: {max} Low: {min}")
    temp = get_temp(forecast_data['temperature'], min)
    forcast_string = (f"{forecast_data['name']} will be {temp}. " +
                      f"The forecast is {forecast_data['detailedForecast']} " +
                      f"The Low will be {min}")
    return forcast_string


n = NOAA()
res = n.get_forecasts('19067', 'US', type="forecast")
res2 = n.get_forecasts('19067', 'US', type="forecastHourly")
forecast = get_forcast(res[2], res2)
print(forecast)

myobj = gTTS(text=forecast, lang="en", slow=True)

# Saving the converted audio in a mp3 file named
# welcome
path = "I:\\audio\\weather"
filename = "weather"
ext = "mp3"

myobj.save(f"{path}\\{filename}0.{ext}")
for num in range(1, 3):
    shutil.copy(f"{path}\\{filename}0.{ext}", f"{path}\\{filename}{num}.{ext}")

Wednesday, November 1, 2023

Halloween costume

 My son wanted to be Iron Spider for Halloween this year. 

(The photo is from our trunk or treat this year. I literally googled "spiderman trunk or treat" found an idea, and just copied it cutting out pieces from colored plastic table clothes)



Here is what iron spider looks like for reference.



We got an Iron Spider costume, but it obviously didn't come with the arms... So I started thinking how I could make the arms without also having him maim other kids walking down the street.

Then I remembered a last minute Halloween costume by Adam Savage from the Mythbusters,




So I got some 1/4" aluminum armature wire, and the insulation with adhesive on one side you use to insulate door jams. I stuck the insulation to itself on either side of the wire, then shaped it with some scissors, and spray painted it gold.

My wife then got an old backpack from a friend, cut everything off but the back pad, and the straps. She the cut a piece of wood to size, and drilled some holes with a jig to hold the arms in place. We fit the wood to the backpack with some screws (flat on the side that would be touching his back) then used colored duct tape to cover everything and fit with his costume.

He was pretty happy with how it turned out. 




Tuesday, October 31, 2023

Halloween 2023

I love making these interactive "games" for kids on Halloween. 


This year I used the "skibidi" battle from the game I just made and slapped a kinect plugin onto it. Kids LOVED it.



Saturday, October 28, 2023

Biggest 3d print

 I love printing the "lucky13" action figures for my son, so I decided to try and print a 500% version. 

He loves it.



Friday, October 27, 2023

Plunger Game

 A little while ago, I went to a party for a 2 year old, and an older kid noticed my zelda tshirt. We started talking about games, and I mentioned that I like to make games for kids to practice using the Unreal Engine.

I asked if he could make any game in the world, what would he make. He said he'd make a plunger shooter.

This kid had no idea what type of game design I could do, so I figured I'd have fun a pull the rug out from him a few times. The first level is a simple looking cartoon 2d side scroller game, when you get to the end, you "fall through the world" into a Playstation 1 style 3rd person plunger shooter. When you get to the end of this level, you fall through again (this is a reference to the next level, which is inspired from a very popular "meme" video for kids his age named "the backrooms")

The last level is a first person plunger shooter with monkey's that throw poop at you. If you wander around, and follow the arrows on the walls, you find the boss, which is another popular meme for kids his age "skibidi toilet".

Here is the Plunger Game. (All of the assets/art are from other gamedevs, I just quick kitbashed this together in a couple days to make a kids idea reality.



Sunday, October 8, 2023

Fully modeled prints

 This is the next level in progress, I took just the joints from the lucky13 action figure model and grafted on the real in-game model from five nights at freddys. This is the only version of this action figure, as I made it, and painted it custom myself. (using thew fancy paint pens I found recently "posca markers")






Im pretty proud of this one and how it came out. 

Hacking a 3ds to add parental controls

  The 3ds is an amazing piece of hardware. Especially if you hack it to add homebrew/emulators. My son has been enjoying a bit of "free...