adafruit lcd
My son and I were working on an Adafruit NeoTrellis M4 Mainboard over the holidays. This amazing little device puts a NeoPixel + an Audio board + a USB port along with a 120 MHz Cortex M4 Core and a mic amplifier and you can program it with CircuitPython. CircuitPython is open source and on Github at https://github.com/adafruit/circuitpython. "CircuitPython is an education friendly open source derivative of MicroPython." It works with a bunch of boards including this NeoTrellis and it's just lovely for teaching and learning.
我的儿子和我在假期期间在Adafruit NeoTrellis M4主板上工作。 这个神奇的小设备将NeoPixel +音频板+ USB端口以及120 MHz Cortex M4 Core和麦克风放大器放在一起,您可以使用CircuitPython对其进行编程。 CircuitPython是开源的,在Github上位于https://github.com/adafruit/circuitpython 。 “CircuitPython是一个教育友好的开源衍生MicroPython 。” 它可以与包括Neo Neo在内的许多板一起使用,非常适合教与学。
This item is just the mainboard! You'll almost certainly want two Silicone Elastomer 4x4 Pads and an enclosure to go along.
As with a lot of these small boards, when you plug a NeoTrellis into a your machine via USB you'll get new disk drive that pops up. All you have to do to "deploy" your code is copy it to your drive. Even better, why not just edit the code place?
与许多此类小板一样,当您通过USB将NeoTrellis插入计算机时,会弹出新的磁盘驱动器。 您只需要将代码“部署”到驱动器中即可。 更好的是,为什么不只是编辑代码位置呢?
There's a great Python editor called Mu that works well with Circuit Python. However, my son and I are more familiar with Visual Studio Code so we wanted to see how it worked with Circuit Python.
有一个很棒的Python编辑器Mu ,可以很好地与Circuit Python配合使用。 但是,我的儿子和我对Visual Studio Code更加熟悉,因此我们想看看它如何与Circuit Python一起使用。
We installed the Python extension for VS Code as well as the Arduino extension for VS Code and the Arduino IDE directly from the Windows Store.
我们直接从Windows应用商店安装了VS Code的Python扩展以及VS Code的Arduino扩展和Arduino IDE 。
Fire up VS Code and File | Open Folder and open the Disk Drive of the NeoTrellis and open (or create) a code.py file. Then from the Command Palette (Ctrl-Shift-P) in VS Code select Arduino > Initialize. If you get an error you may need to set up the path to your Arduino IDE. If you installed it from the Windows Store like we did you may find it in a weird path. We set the arduino.path like this:
启动VS代码和文件打开文件夹并打开NeoTrellis的磁盘驱动器,然后打开(或创建)code.py文件。 然后从VS Code中的Command Palette(Ctrl-Shift-P)中选择Arduino> Initialize。 如果遇到错误,则可能需要设置Arduino IDE的路径。 如果像我们一样从Windows应用商店安装它,您可能会在一个奇怪的路径中找到它。 我们将arduino.path设置如下:
"arduino.path": "C:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.19.0_x86__mdqgnx93n4wtt"
The NeoTrellis M4 also shows up as a COM port so you can look at its Serial Output for debugging purposes as if it were an Arduino (because it is underneath). You then Arduino > Select a COM Port from the Command Palette and it will create a file called .vscode/arduino.json in your folder that will look like this:
NeoTrellis M4还显示为COM端口,因此您可以出于调试目的查看其串行输出,就好像它是Arduino(因为它在下面)一样。 然后,您选择Arduino>从命令面板中选择一个COM端口,它将在您的文件夹中创建一个名为.vscode / arduino.json的文件,如下所示:
{
"port": "COM3"
}
Now, within Visual Studio Code select Arduino > Open Serial Monitor and all of your print("") methods will output to that bottom pane.
现在,在Visual Studio Code中,选择Arduino> Open Serial Monitor,所有的print(“”)方法将输出到该底部窗格。
Of course, we could putty into the COM Port but since I'm using this as a learning tool with my 11 year old, I find that a single window that shows both the console and the code help them focus, rather than managing multiple windows.
当然,我们可以在COM Port中使用腻子,但是由于我11岁时就使用它作为学习工具,因此我发现一个同时显示控制台和代码的窗口可以帮助他们集中精力,而不是管理多个窗口。
At this point we have a nice Developer Inner Loop going. That inner loop for us (the developers) is that we can write some code, hit save (Ctrl-S) and get immediate feedback. The application restarts when it detects the code.py file has changed and any debug (print) statements appear in the console immediately.
至此,我们进行了一个不错的开发人员内部循环。 对我们(开发人员)而言,内在循环是我们可以编写一些代码,点击保存(Ctrl-S)并立即获得反馈。 当应用程序检测到code.py文件已更改并且任何调试(打印)语句立即出现在控制台中时,它将重新启动。
We are really enjoying this Adafruit NeoTrellis M4 Express kit. Next we're going to make a beat sequencer since the Christmas Soundboard was such a hit with mom!
我们真的很喜欢Adafruit NeoTrellis M4 Express套件。 接下来,我们将制作一个节拍音序器,因为圣诞节共鸣板对妈妈如此受欢迎!
adafruit lcd