Getting Started
Adafruit Playground is a wonderful and safe place to share your interests with Adafruit's vibrant community of makers and doers. Have a cool project you are working on? Have a bit of code that you think others will find useful? Want to show off your electronics workbench? You have come to the right place.
The goal of Adafruit Playground is to make it as simple as possible to share your work. On the Adafruit Playground users can create Notes. A note is a single-page space where you can document your topic using Adafruit's easy-to-use editor. Notes are like Guides on the Adafruit Learning System but guides are high-fidelity content curated and maintained by Adafuit. Notes are whatever you want them to be. Have fun and be kind.
Click here to learn more about Adafruit Playground and how to get started.
-
Pinned by AnneBarela
Setting Up an LLM Model on Your Own Computer
Many of us have been there: working with Claude, ChatGPT, Copilot, etc. and BOOM, the token allowance runs out and you have to wait a few hours for it to reset. All you want to do is finish your project.
Well, you are on your personal computer which can compute things. Perhaps your machine can even play some fairly recent games? If so, you have free compute right at your fingertips.
Some of the AI models used by the big companies are available for free. This is true. The trouble is knowing which model to get, where to get it, what to run it with and how to tune the model to your machine. If this sounds complicated, it's less complicated than installing current games and likely takes up less space. But you'll want to follow this guide for some tips on how to do this.
There are many models and many ways to run them. I'll show you some of what I have done as an example for you to do similar.
-
Guide: Using Python on Windows 10
It’s been widely known for many years that Windows is the only mainstream operating system that has not included a Python interpreter out of the box. For many users who are never going to need it, this helps reduce the size and improves the security of the operating system. But for those of us who would like to use it, Python’s absence has been keenly felt.
The Windows 10 May 2019 Update
With the May 2019 update to Windows 10, there are two methods to get Python 3.7 or later on your computer. As of January 2023, there are community releases of Python 3.7. 3.8, 3.9, 3.10, and 3.11 in the Microsoft Store. This will be the default choice for getting Python if you are looking for an easy install separate than those available on the Internet.
-
Bluetooth Controlled Electrical Outlets
The Adafruit Controllable Four Outlet Power Relay Module is a very neat piece of hardware (if you live in a 120 volt AC country). It has a pair of contacts on the side that can take a wide range of voltages to switch electrical loads on and off. This is just what my wife wanted, a method to remotely control power outlets to some gear in her office.
But how to switch it remotely. WiFi relies on connectivity that might get hacked over the internet in our view. Bluetooth seems more secure (maybe local hacking is possible, but our locality isn't a concern). I initially picked up an Adafruit Feather ESP32-S3. But CircuitPython Bluetooth doesn't work for UART/Serial profile. I want to, for proof of concept, use the Adafruit Bluefruit LE Connect application (available for iOS and Android) to send codes for on and off. That limits my choices to the Nordic nRF52840-based microcontroller boards.
Code
I modified some example code on how to connect the nRF52840 board to the Connect app. In the Getting Started with CircuitPython and Bluetooth Low Energy guide, I modified the Button Press example to also toggle the
button.TXpin high when the up arrow is pressed, low when the down arrow is pressed.I connected my CPB to my computer with a known good data+power micro B USB cable (Adafruit sells many different ones). I used the Mu editor to copy the example code and modify it to use digitalio for the pin toggling and neopixel to use two of the colorful RGB LEDs as status lights (one for Bluetooth connected, one for the switch state).
I needed to copy several libraries over to the /lib directory on the CIRCUITPY drive with File Explorer on my computer.
- neopixel
- adafruit_ble
- adafruit_bluefruit_connect
The latest Library Bundle is on the circuitpython.org website.
Next I used Mu to save the code to a file named code.py on the CIRCUITPY drive.
Here is the code:
-
Accessing Remote Disks on MS-DOS via TCP
Overview
Most people scream and run when it comes to using an MS-DOS PC to do any sort of networking. Most folks started networking with Windows which made it much easier. Business users could use a number of networking hardware/software solutions but they were expensive and usually proprietary.
Fortunately the standards governing the internet are fairly universal and some clever folks have developed software to allow machines, even the IBM PC 5150, PCjr, and other MS-DOS machines to access today's internet (albeit without modern browsers of course). And speed is not high: an 8088 at 4.77 MHz is not a fast processor. But using basic internet commands usually does not take many CPU cycles and it just works.
This tutorial will use mTCP and it's new addition NetDrive, both by Michael B. Brutman who I applaud for fabulous work porting the software to allow old machines to do fancy things.
Hardware
While the mTCP software runs on a variety of MS-DOS machines. I first selected an IBM PC/XT 5160 with a BIOS date of 1986, then an IBM PC/AT 5170. You'll need a working machine which boots to DOS. A hard disk isn't required but recommended for speed. The software works with virtual MS-DOS images also, see the mTCP documentation for that as it's beyond this guide.
The machine should boot DOS 2.0 or above. MS-DOS 3.31 or better is recommended due to support for larger hard disk partitions. Exact DOS versions is listed in the mTCP documentation.
This XT machine I have for this guide has a 20MB half height drive with MS-DOS 6.22 installed. It also has an 8-bit XT-IDE card which provides an IDE hard disk interface in addition to the native MFM hard drive card. Attached is an IDE to Compact Flash card adapter with a 16MB CF card with basic software. It makes it easy to transfer software between my current desktop and vintage machines.
The AT machine I have also has an XT-IDE card as it's primary drive (the MFM drive is inoperable).
-
Web Browsers for MS-DOS and 8088/80286 Computers
Web browsers were not "a thing" during the heydey of 8088/8086/80286 IBM Compatible MS-DOS computers, which were generally made in the 1980s. The first web browser, called WorldWideWeb, was written in 1989 by Tim Berners-Lee, a computer scientist, on a NeXT computer, with the software going into the public domain in 1993. (CERN) Browsers were ported to PCs and similar computers like Amiga around 1993. Netscape Navigator came out in 1994, taking off in 1995. Microsoft Internet Explorer was released in 1995. (Wikipedia: History of the web browser)
The IBM PC came out in 1981, the PC/XT in 1983, the PC/AT in 1984. PS/2 computers arrived in 1988.
These computers predate the heyday introduction of web browsing software by approximately 5 to 10 years. But that does not mean folks have not been porting or backporting web browsers to older hardware.
Modern browsers have so much that Tim Berners-Lee's browser didn't. Advanced graphics, style sheets, JavaScript and much more. How does all that translate to using a browser on vintage equipment? Not well.
Specifically for the 8088, 8086, and 80286, the chips do not have enough processing power to provide anything near a modern web browsing experience (Berner-Lee's NeXT Cube was 25MHz Motorola 68030-based) (Wikipedia).
So browsers that work with older equipment forgo some or many of the features of modern browsers. Some have graphics mode, some are text based. Most workable MS-DOS browsers do not have HTTPS security. And graphics like JPG, PNG, and GIF are rudimentary if not missing.
This Note will discuss some of the browsers available for vintage IBM PCs and compatibles.
What Makes a Web Browser 8088/8086/80286 IBM Compatible?
This Note is only confining itself to the processors mentioned and only MS-DOS, the predominant operating system. By the time the first Windows web browser came to market (Internet Explorer in 1995), 80386 and 80486 computers were common. Any browsers for Windows 3.1 and earlier would have been backported.
Here is a list of common hardware that software had to use in the time period:
- Processors: 8088, 8086, 80286
- Clock Speeds: 4.77 MHz to 8 MHz
- Displays: CGA, MGA / Hercules, EGA, VGA (640x480 max, no hardware acceleration to speak of)
- Memory Sizes: 512K to 4000K RAM or so
- Hard Disk: 10MB to 40MB
- Network Interfaces: 10MB Ethernet TCP/IP (8-bit for 8088/6, 16-bit for 80286), Serial SLIP, PPP
To summarize: slow processors, slow and small displays, limited memory and slow communications.
Web browsers calaining compatibility with this set of hardware must work with these hardware restraints. Any software requiring Windows 3.11 (80386) or higher or MS-DOS > 6.22 (like Windows 95) are not in this class.