Raspberry Pi Code Editor All In One
Raspberry Pi Code Editor All In One
We’ve chosen Python
as the first programming language
our Code Editor supports because it is popular in schools, CoderDojos, and Code Clubs.
Many educators and young people like Python because they see it as similar to the English language.
Python is also widely used by professional programmers
and usually tops at least one of the industry-standard indexes that ranks programming languages.
We will be adding support for web development languages (HTML/CSS/JavaScript) to the Editor in the near future.
我们选择 Python 作为代码编辑器支持的第一种编程语言,因为它在学校、CoderDojos 和代码俱乐部中很流行。
许多教育工作者和年轻人喜欢 Python,因为他们认为它类似于英语。
Python 也被专业程序员广泛使用,并且通常至少在一项对编程语言进行排名的行业标准指数中名列前茅。
我们将在不久的将来向编辑器添加对 Web 开发语言 (HTML/CSS/JavaScript) 的支持。
https://editor.raspberrypi.org/en/
emoji
support
https://www.raspberrypi.org/blog/code-editor-beta-testing/
beta
Code Editor is in beta
What does beta mean?
Beta means that we are not quite finished yet, and some things might not look or work as well as we’d like. However, it also means you are one of the first people to use our new Code Editor!
What next?
We'll soon be asking for your feedback, so we can work on making it better for you, and other digital makers.
GPIO
module bug
ust the standard library
and P5
for now
目前只有标准库和 P5
ImportError: No module named RPi on line 4 of main.py
ImportError: No module named RPi on line 4 of main.py
#!/usr/bin/env python3
# coding: utf8
import RPi.GPIO as GPIO
from datetime import datetime
import time
import sys
arg1 = sys.argv[1]
print("arg1 =", arg1);
# shell 获取时间戳 ✅
# SH_DATE=$(TZ=':Asia/Shanghai' date '+%Y-%m-%d %T');
# datetime = $(date '+%Y-%m-%d %T')
# Python 获取时间戳 ✅
now = datetime.now()
# 转换为指定的格式
currentTime = now.strftime("%Y-%m-%d %H:%M:%S")
print("⏰ current datetime =", currentTime);
# $ pinout 命令查看,或 https://pinout.xyz/
# 指定 BCM 模式下的 GPIO 针脚编号是 12
# 对应的物理针脚编号是 32
PIN = 12
# BCM 模式
GPIO.setmode(GPIO.BCM)
# 指定 GPIO 针脚为一个电流输出针脚
GPIO.setup(PIN, GPIO.OUT)
# 输出低电平
GPIO.output(PIN, GPIO.LOW)
# index
i = 0
# 类型转换,str => int
n = int(arg1)
print("n =", n)
print('开始闪烁⏳')
while (i < n):
print("i =", i)
# 高电平,LED 点亮
GPIO.output(PIN, GPIO.HIGH)
# 休眠 1 秒,防止 LED 长时间点亮烧坏了
time.sleep(1.0)
# 低电平,LED 熄灭
GPIO.output(PIN, GPIO.LOW)
# 休眠 1 秒
time.sleep(1.0)
i = i + 1
# 输出低电平,LED 关闭
# GPIO.output(PIN, GPIO.LOW)
# 清除,释放内存
GPIO.cleanup()
print('结束闪烁 👌🏻')
feedback
https://form.raspberrypi.org/4873313
mailto:partners@raspberrypi.org
Python
https://projects.raspberrypi.org/en/pathways/python-intro-code-editor
https://projects.raspberrypi.org/en/projects/hello-world-editor/0
Scratch
https://projects.raspberrypi.org/en/pathways/scratch-intro
projects
https://projects.raspberrypi.org/en/projects
https://projects.raspberrypi.org/en/codeclub
https://projects.raspberrypi.org/en/coderdojo
refs
Tiobe Index
https://www.tiobe.com/tiobe-index/
©xgqfrms 2012-2025
www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!
原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/17321616.html
未经授权禁止转载,违者必究!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
· Pantheons:用 TypeScript 打造主流大模型对话的一站式集成库
2022-04-15 TypeScript @decorator in depth
2022-04-15 TypeScript keyof All In One
2022-04-15 TypeScript class filed init value All In One
2022-04-15 TypeScript generic All In One
2021-04-15 Linux scp command All In One
2021-04-15 import { componentName as componentAlias} form module
2021-04-15 how to install Nginx on CentOS 7 All In One