嵌入式产品级-超小尺寸游戏机(从0到1 硬件-软件-外壳)

Ultra-small size gaming console。

超小尺寸游戏机-Pico

This embedded product is mainly based on miniaturization, followed by his game functions are also very complete, for all kinds of games can be played, and there will be relevant illustrations in the follow-up of the article.

This product is a very, very small game console, and he has all the functions inherent in the game console.

这款超小尺寸游戏机Pico,是一款结合了小型化设计和强大游戏功能的嵌入式设备。它的体积非常紧凑,适合携带,同时它依然保留了传统游戏机的各种功能。无论是经典的2D横版游戏、复古的街机游戏,还是一些现代的小游戏,Pico都能够顺利运行。

Pico的设计重点之一就是极致的便携性,尽管体积小,但依然能提供丰富的游戏体验。它通常具备类似按键、显示屏和扬声器的基本硬件配置,能够满足各种游戏操作的需求。此外,Pico内置了游戏模拟器和相关软件,使得用户能够体验不同平台上的游戏。

具体来说,这款游戏机可能搭载了流行的嵌入式开发平台,如Raspberry Pi Pico,支持多种编程语言和工具,甚至可以通过自定义代码和硬件扩展来进一步增强其功能。

  • 极致便携性:Pico的尺寸非常小巧,方便携带。无论是放口袋里还是随身携带,都不占太多空间,适合外出时随时随地享受游戏。

  • 强大兼容性:它支持多种游戏模拟器和格式,能够运行各类经典游戏,包括复古街机游戏、掌机游戏等,甚至可以自定义加载新游戏。

  • 高性价比:作为一款小型游戏机,Pico提供的功能远超其体积。你可以以较低的成本享受到多种游戏的娱乐体验,同时它还支持编程开发,适合开发者进行定制化应用。

  • 开源与可定制性:Pico基于流行的嵌入式平台(如Raspberry Pi Pico),具有开源特性,允许用户根据个人需求进行软件和硬件的修改和扩展,能够轻松实现个性化定制。

  • 简单易用:操作界面简洁,用户只需轻松连接显示设备和控制器,就可以迅速开始游戏。无论是初学者还是有经验的玩家都能很快上手。

  • 节能高效:由于体积小,功耗低,Pico非常节能,适合长时间游戏而不需要频繁充电。

  • 丰富的开发资源:由于其基于开放平台,Pico有着丰富的开发资源和社区支持,用户可以轻松找到教程、工具和讨论,快速进行功能扩展。

  • 多功能集成:除了作为游戏机,Pico还可以作为其他嵌入式项目的开发平台,具备了强大的开发潜力和应用灵活性。

下述为原理图以及PCB。

下述为相关游戏的部分案例代码。

import PICOplaygame 
import time 
import random 
import gc from machine 
import freq
freq(125_000_000)
gc.enable() # This line helps make sure we don't run out of memory
# Sensitive game parameters
XVel = 0.05 YVel = 0 Distance = 0 YPos = 0 Gravity = 0.15 MaxFPS = 60 Points = 0 GameRunning = True CactusPos = random.randint(72, 300) CloudPos = random.randint(60, 200) JumpSoundTimer = 0
# Sprite data
PlayerSpr = bytearray([0x04 ^ 0xFF, 0x08 ^ 0xFF, 0xC8 ^ 0xFF, 0xBC ^ 0xFF, 0x1C ^ 0xFF, 0x0E ^ 0xFF, 0x1A ^ 0xFF, 0x2C ^ 0xFF]) PlayerRunFrame1 = bytearray([0xFF, 0xFF, 0xFF, 0xFD, 0xF9, 0xBB, 0xBB, 0xD3, 0xE1, 0xF1, 0xC1, 0xB3, 0x61, 0xD5, 0xF3, 0xFF]) PlayerRunFrame2 = bytearray([0xFF, 0xFF, 0xF7, 0xFB, 0xFB, 0xFB, 0x3B, 0x93, 0xE3, 0x71, 0x03, 0xE7, 0xC3, 0xAB, 0xE7, 0xFF]) CactusSpr1 = bytearray([0x00 ^ 0xFF, 0xFC ^ 0xFF, 0x86 ^ 0xFF, 0x92 ^ 0xFF, 0xC2 ^ 0xFF, 0xFC ^ 0xFF, 0x00 ^ 0xFF, 0x00 ^ 0xFF]) CactusSpr2 = bytearray([0x00 ^ 0xFF, 0x1E ^ 0xFF, 0x10 ^ 0xFF, 0xFE ^ 0xFF, 0xE4 ^ 0xFF, 0x20 ^ 0xFF, 0x78 ^ 0xFF, 0x00 ^ 0xFF]) CloudSpr = bytearray([0x9F, 0x4F, 0x63, 0x59, 0xBD, 0x73, 0x73, 0x65, 0x5C, 0x7E, 0x7E, 0x51, 0x57, 0x4F, 0x1F, 0xBF])
CactusSpr = CactusSpr1
PICOplaygame.display.fill(0) PICOplaygame.display.drawText("Tinysaur", 12, 0, 1) PICOplaygame.display.drawText("  Run", 15, 9, 1) PICOplaygame.display.update()
PICOplaygame.display.setFPS(60)
PICOplaygame.saveData.setName("SaurRun")
while(PICOplaygame.buttonA.pressed() == True or PICOplaygame.buttonB.pressed() == True): if(time.ticks_ms() % 1000 < 500): PICOplaygame.display.drawFilledRectangle(0, 32, 72, 8, 0)
        PICOplaygame.display.drawText("Press A/B", 9, 32, 1) else: PICOplaygame.display.drawFilledRectangle(0, 32, 72, 8, 1)
        PICOplaygame.display.drawText("Press A/B", 9, 32, 0) PICOplaygame.display.update()
    pass while(PICOplaygame.buttonA.pressed() == False and PICOplaygame.buttonB.pressed() == False): if(time.ticks_ms() % 1000 < 500): PICOplaygame.display.drawFilledRectangle(0, 32, 72, 8, 0)
        PICOplaygame.display.drawText("Press A/B", 9, 32, 1) else: PICOplaygame.display.drawFilledRectangle(0, 32, 72, 8, 1)
        PICOplaygame.display.drawText("Press A/B", 9, 32, 0) PICOplaygame.display.update()
    pass while(PICOplaygame.buttonA.pressed() == True or PICOplaygame.buttonB.pressed() == True): if(time.ticks_ms() % 1000 < 500): PICOplaygame.display.drawFilledRectangle(0, 32, 72, 8, 0)
        PICOplaygame.display.drawText("Press A/B", 9, 32, 1) else: PICOplaygame.display.drawFilledRectangle(0, 32, 72, 8, 1)
        PICOplaygame.display.drawText("Press A/B", 9, 32, 0) PICOplaygame.display.update()
    pass
while(GameRunning): t0 = time.ticks_us() # Check the time
    # Is the player on the ground and trying to jump?
    if(JumpSoundTimer < 0): JumpSoundTimer = 0 if((PICOplaygame.buttonA.pressed() == True or PICOplaygame.buttonB.pressed() == True) and YPos == 0.0): # Jump!
        JumpSoundTimer = 200
        YVel = -2.5
    # Handle "dynamics"
    YPos += YVel
    YVel += Gravity
    Distance += XVel
    JumpSoundTimer -= 15
    if(JumpSoundTimer > 0): PICOplaygame.audio.set(500-JumpSoundTimer) else: PICOplaygame.audio.stop()
    # Accelerate the player just a little bit
    XVel += 0.000025
    # Make sure we haven't fallen below the groundW
    if(YPos > 0): YPos = 0.0
        YVel = 0.0
    # Has the player hit a cactus?
    if(CactusPos < 8 and CactusPos > -8 and YPos > -8): # Stop the game and give a prompt
        GameRunning = False
        PICOplaygame.display.fill(1)
        PICOplaygame.audio.stop()
        PICOplaygame.display.drawText("Oh no!", 18, 1, 0)
        PICOplaygame.display.drawText(str(int(Distance))+"m", 26, 9, 0) high = -1
        if(PICOplaygame.saveData.hasItem("highscore")): high = int(PICOplaygame.saveData.getItem("highscore"))
            PICOplaygame.display.drawText("High: " + str(high)+"m", 8, 17, 0) if(Distance > high): PICOplaygame.saveData.setItem("highscore", Distance)
            PICOplaygame.saveData.save() PICOplaygame.display.drawText("Again?", 19, 25, 0)
        PICOplaygame.display.drawText("A:N B:Y", 16, 33, 0)
        PICOplaygame.display.update()
        PICOplaygame.audio.playBlocking(300, 250)
        PICOplaygame.audio.play(260, 250)
        while(PICOplaygame.inputPressed() == False): pass # Wait for the user to give us something
        while(GameRunning == False): if(PICOplaygame.buttonB.pressed() == True == 1): # Restart the game
                XVel = 0.05
                YVel = 0
                Distance = 0
                YPos = 0
                Points = 0
                GameRunning = True
                CactusPos = random.randint(72, 300)
                CloudPos = random.randint(60, 200)
            elif(PICOplaygame.buttonA.pressed() == True): # Quit
                PICOplaygame.reset() # Exit game to main menu
    # Is the cactus out of view?
    if(CactusPos < -24): # "spawn" another one (Set its position some distance ahead and change the sprite) Points += 10
        PICOplaygame.audio.play(440, 300)
        CactusPos = random.randint(72, 500)
        if(random.randint(0, 1) == 0): CactusSpr = CactusSpr1 else: CactusSpr = CactusSpr2
    # Is the cloud out of view?
    if(CloudPos < -32): # "spawn" another one
        CloudPos = random.randint(40, 200)
    # More dynaaaaaaaaaaaamics
    CactusPos -= XVel * 16
    CloudPos -= XVel * 2
    # Draw game state
    PICOplaygame.display.fill(1)
    PICOplaygame.display.blit(CactusSpr, int(16 + CactusPos), 24, 8, 8, 1, 0, 0) PICOplaygame.display.blit(CloudSpr, int(16 + CloudPos), 8, 16, 8, 1, 0, 0)
    if(t0 % 250000 < 125000 or YPos != 0.0): # Player is in first frame of run animation
        PICOplaygame.display.blit(PlayerRunFrame1, 8, int(23 + YPos), 16, 8, 1, 0, 0) else: # Player is in second frame of run animation
        PICOplaygame.display.blit(PlayerRunFrame2, 8, int(24 + YPos), 16, 8, 1, 0, 0)
    PICOplaygame.display.drawFilledRectangle(0, 31, PICOplaygame.display.width, 9, 0) # Ground PICOplaygame.display.drawText(str(int(Points)), 0, 0, 0) # Current points PICOplaygame.display.drawText("pts", len(str(int(Points))) * 8, 0, 0) PICOplaygame.display.drawText(str(int(Distance)), 0, 32, 1) # Current distance PICOplaygame.display.drawText("m", len(str(int(Distance))) * 8, 32, 1) PICOplaygame.display.update()
    # Spin wheels until we've used up one frame's worth of time
    while(time.ticks_us() - t0 < 1000000.0 / MaxFPS): pass 

下述内容就是功能演示了。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/981200.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

计算机网络-实验四子网划分

三、实验内容及步骤 1.要求 【题目】某单位申请了⼀个 C 类⽹络&#xff0c;单位内部有3个部门&#xff0c;各部门约50台主机&#xff0c;需要划分为3个⼦⽹&#xff0c;各部门接⼊到汇聚交换机&#xff0c;在汇聚层进⾏路由连通。假定申请到的C类网络为200.200.200.0。 2.实…

deepseek+mermaid【自动生成流程图】

成果&#xff1a; 第一步打开deepseek官网(或百度版&#xff08;更快一点&#xff09;)&#xff1a; 百度AI搜索 - 办公学习一站解决 第二步&#xff0c;生成对应的Mermaid流程图&#xff1a; 丢给deepseek代码&#xff0c;或题目要求 生成mermaid代码 第三步将代码复制到me…

SQL Server2022版+SSMS安装教程(保姆级)

SQL Server2022版SSMS安装教程&#xff08;保姆级&#xff09; 一&#xff0c;安装SQL Server数据库 1.下载安装包 &#xff08;1&#xff09;百度网盘下载安装包 链接&#xff1a;https://pan.baidu.com/s/1A-WRVES4EGv8EVArGNF2QQpwd6uvs 提取码&#xff1a;6uvs &#…

Pany-v2:LFI漏洞探测与敏感文件(私钥窃取/其他)自动探测工具

地址:https://github.com/MartinxMax/pany 关于Pany-v2 Pany-v2 是一款 LFI&#xff08;本地文件包含&#xff09;漏洞探测工具&#xff0c;具备自动识别敏感文件的能力。它能够利用 LFI 漏洞检测并提取 id_rsa 私钥、系统密码文件以及其他可能导致安全风险的敏感信息。该工具…

【音视频】视频基本概念

一、视频的基本概念 1.1 视频码率&#xff08;kb/s&#xff09; 视频码率是指视频文件在单位时间内使用的数据流量&#xff0c;也叫码流率。码率越大&#xff0c;说明单位时间内取样率越大&#xff0c;数据流进度也就越高 1.2 视频帧率&#xff08;fps&#xff09; 视频帧率…

三维数据可视化与表面重建:Marching Cubes算法的原理与应用

1. 引言 随着现代医学影像技术的飞速发展&#xff0c;三维数据的可视化与重建已成为医学研究、临床诊断和手术规划的重要工具。在众多三维重建算法中&#xff0c;Marching Cubes算法因其高效、稳定的特性成为从离散数据场中提取等值面的经典方法。本报告将深入探讨Marching Cu…

探秘基带算法:从原理到5G时代的通信变革【七】FFT/DFT

文章目录 2.6 FFT/DFT2.6.1 离散傅里叶变换&#xff08;DFT&#xff09;2.6.2 快速傅里叶变换&#xff08;FFT&#xff09;2.6.3 方法论与分类体系2.6.4 优缺点与应用2.6.5 实现细节 本博客为系列博客&#xff0c;主要讲解各基带算法的原理与应用&#xff0c;包括&#xff1a;v…

水仙花数(华为OD)

题目描述 所谓水仙花数&#xff0c;是指一个n位的正整数&#xff0c;其各位数字的n次方和等于该数本身。 例如153是水仙花数&#xff0c;153是一个3位数&#xff0c;并且153 13 53 33。 输入描述 第一行输入一个整数n&#xff0c;表示一个n位的正整数。n在3到7之间&#x…

《Python实战进阶》No 7: 一个AI大模型聊天室的构建-基于WebSocket 实时通信开发实战

第7集&#xff1a; 一个AI大模型聊天室的构建-基于WebSocket 实时通信开发实战 在现代 Web 开发中&#xff0c;实时通信已经成为许多应用的核心需求。无论是聊天应用、股票行情推送&#xff0c;还是多人协作工具&#xff0c;WebSocket 都是实现高效实时通信的最佳选择之一。本…

极简Redis速成学习

redis是什么&#xff1f; 是一种以键值对形式存储的数据库&#xff0c;特点是基于内存存储&#xff0c;读写快&#xff0c;性能高&#xff0c;常用于缓存、消息队列等应用情境 redis的五种数据类型是什么&#xff1f; 分别是String、Hash、List、Set和Zset&#xff08;操作命…

ADC采集模块与MCU内置ADC性能对比

2.5V基准电压源&#xff1a; 1. 精度更高&#xff0c;误差更小 ADR03B 具有 0.1% 或更小的初始精度&#xff0c;而 电阻分压方式的误差主要来自电阻的容差&#xff08;通常 1% 或 0.5%&#xff09;。长期稳定性更好&#xff0c;分压电阻容易受到温度、老化的影响&#xff0c;长…

python数据容器切片

从一个序列中取出一个子序列 序列[起始位置:结束位置:步长] 起始位置和结束位置 省略,表示从头取到尾 步长省略表示1 步长负数,表示从后往前取 步长-1 等同于将序列反转了

【网络安全 | 渗透测试】GraphQL精讲一:基础知识

未经许可,不得转载, 文章目录 GraphQL 定义GraphQL 工作原理GraphQL 模式GraphQL 查询GraphQL 变更(Mutations)查询(Queries)和变更(Mutations)的组成部分字段(Fields)参数(Arguments)变量别名(Aliases)片段(Fragments)订阅(Subscriptions)自省(Introspecti…

005-Docker 安装 Redis

Docker 安装 Redis 1.从镜像官网拉取Redis镜像2.创建实例并启动3.测试连接4.设置开机启动 1.从镜像官网拉取Redis镜像 镜像官网地址&#xff1a;https://hub.docker.com执行命令 -- 拉取最新的版本 docker pull redis查看镜像 docker images2.创建实例并启动 先创建好需要的…

【星云 Orbit • STM32F4】04.一触即发:GPIO 外部中断

【星云 Orbit- • STM32F4】04. 一触即发&#xff1a;外部中断控制 摘要 本文详细介绍了如何使用STM32F407微控制器的HAL库实现外部中断功能。通过配置GPIO引脚作为外部中断源&#xff0c;并在中断回调函数中处理按键事件&#xff0c;实现了按键控制LED状态翻转的功能。本文旨…

探索Elasticsearch:索引的CRUD

在企业环境中&#xff0c;Elasticsearch的索引CRUD&#xff08;创建Create、读取Read、更新Update、删除Delete&#xff09;操作是非常基础且频繁使用的功能。这些操作对于管理和维护数据至关重要&#xff0c;尤其是在处理大规模数据集和需要实时搜索与分析的应用场景中。 目录…

React antd的datePicker自定义,封装成组件

一、antd的datePicker自定义 需求&#xff1a;用户需要为日期选择器的每个日期单元格添加一个Tooltip&#xff0c;当鼠标悬停时显示日期、可兑换流量余额和本公会可兑流量。这些数据需要从接口获取。我需要结合之前的代码&#xff0c;确保Tooltip正确显示&#xff0c;并且数据…

NVIDIA GPU 架构详解:Pascal、Volta、Turing、Ampere、Ada、Hopper、Blackwell

目录 1. Pascal&#xff08;帕斯卡&#xff09;架构&#xff08;2016&#xff09;关键技术性能特性代表产品应用场景 2. Volta&#xff08;伏特&#xff09;架构&#xff08;2017&#xff09;关键技术性能特性代表产品应用场景 3.Turing&#xff08;图灵&#xff09;架构&#…

Linux 命令行的基本命令(生信)

常见的操作系统包括 Windows、Mac OS X 和 Unix 。Linux 是类 Unix 操作系 统&#xff0c; 可安装在各种各样的电脑硬件设备&#xff0c; 从手机、平板电脑、路由器到超级计算 机。Linux 是一个领先的操作系统&#xff0c;世界上最快的十台超级计算机运行的都是 Linux 操作系统…

ECharts--中国地图(无敌详细)

前段时间需要做一个中国地图的页面&#xff0c;要求是展示各地产品的销量&#xff0c;我就在网上搜了很多ECharts的资料&#xff0c;学习了一下怎么使用。 本着互相学习&#xff0c;共同进步的原则&#xff0c;特此分享一下自己的学习经验以及使用技巧。如果有用的话可以给老弟…