Basically, Its Minecraft

[SethBling] really likes Minecraft. How can you tell? A quick look at his YouTube channel should convince you, especially the one where he built a full-blown BASIC interpreter in Minecraft. It is not going to win any speed races, as you might expect, but it does work.

For novelty and wow factor, this is amazing. As a practical matter, it is hard to imagine the real value since there are plenty of ways a new programmer could get access to BASIC. Still, you have to admire the sheer audacity of making the attempt. One Hackaday poster (who shall remain nameless) once won a case of beer by betting someone he or she could write a BASIC compiler in BASIC, so we aren’t sticklers for practicality.

Continue reading “Basically, Its Minecraft”

ESP8266 BASIC WiFi Thermostat Is Child’s Play

If you’ve read any of our posts in the last couple years, you’ll have noted that our community is stoked about bringing the Internet to their devices on the cheap with the ESP8266 modules. Why? This forum post that details making a WiFi thermostat really brings the point home: it’s so easy and cheap to build Internet-enabled devices that you almost can’t resist.

When the ESP8266 first came out, there very little documentation, much less code support. Since then Espressif’s SDK has improved, the NodeMCU project brought Lua support, and there’s even Arduino support. Most recently, BASIC has been added to the ESP stable, and that really lowers the barriers to creating a simple WiFi widget, like the thermostat example here that uses a Dallas DS18B20 temperature sensor and an LED as a stand-in for the heater element.

The hardware for this project, a re-build of this demo code from the ESP8266 BASIC docs, is nothing more than a few off-the-shelf parts soldered together. No schematic required.

What makes the project work behind the scenes is some clever code-reuse by [Rotohammer] on the ESP8266 forums. Essentially, he wrapped the Arduino’s one-wire library, giving it simple BASIC bindings. Then all that’s left for the BASIC coder is to read the value and print it out to a webpage.

There’s all sorts of details swept under the rug here, and those of you out there who are used to bare-metal programming will surely huff and puff. But there’s a time for building your own injection-molder to make DIY Lego bricks, and there’s a time to just put blocks together. This project, and the BASIC interpreter that made it possible, demonstrate how much joy someone can get from just putting the parts together.

Basically, It’s An ESP8266

Before the Arduino, there was the Parallax Basic Stamp. It was an easy-to-use PIC chip on a PCB that you programmed in BASIC — a story of those humble beginnings was published earlier this week. Before that, even, legions of small computers from TRS-80s to Commodore 64s and even Altairs were commanded primarily by the BASIC language. BASIC was easy to run on a small machine and very simple to learn. Old fashioned BASICs are difficult to use to write huge systems, but a lot of small computers aren’t going to run very large programs anyway.

The ESP8266 is more than a just a WiFi peripheral for a microcontroller. It is its own little computer in its own right. While it is common to run the “AT” firmware, Lua, or program the device yourself, you can now load the beast with a version of BASIC.

Continue reading “Basically, It’s An ESP8266”

The RUM 80 – A Home Brew Z80 Computer Built From Scratch

[M] recently tipped us off about hacker [Lumir Vanek] from the Czech Republic. Between 1985 and 1989, [Lumir] built his own home brew, Z80 based computer. The list of home computers available in the 1980’s is extensive. Those living in western Europe and the Americas could choose offerings from Acorn, Apple, Commodore, Atari, Radio Shack, and Sinclair Research to name just a few. Even the erstwhile Czechoslovakia had home computers available from Didaktik and Tesla.

[Lumir]’s built was based around the Z80 processor and is built using regular, double-sided, prototyping board. It featured the 8-bit Z80 processor CPU, 8kB EPROM with monitor and BASIC, two Z80 CTC timers, an 8255 parallel interface for keyboard and external connector, 64kB DRAM, and Video output in black & white, 40×25 characters, connected to a TV. The enclosure is completely made from copper clad laminate. [Lumir] documented the schematics, but there is no board layout – since the whole thing was discrete wired. He even built the membrane keyboard – describing it as “layers of cuprextit, gum, paper with painted keys and transparent film”. When he ran out of space on the main board, he built an expansion board. This had an 8251 serial interface for cassette deck, one 8-bit D/A converter, and an 8255 parallel port connected to the “one pin” BT100 printer.

On the software side, he wrote his own monitor program, which allowed simple interactions, such as displaying and modifying registers, memory, I/O ports and to run programs. He wrote this from scratch referring to the Z80 instruction set for help. Later he added a CP/M emulator. Since the Z80 had dual registers, one was used for user interaction, while the other was reserved to allow background printing. Eventually, he even managed to port BASIC to his system.

Check out [Martin Malý]’s awesome article Home Computers behind the Iron Curtain and the follow up article on Peripherals behind the  Iron Curtain, where you can read more about the “one pin” BT100 printer.

Continue reading “The RUM 80 – A Home Brew Z80 Computer Built From Scratch”

Extrinsic Motivation: BASIC For Bluetooth

There’s a lot more to those fancy radio modules you use with your Arduino projects than meets the eye. Many of them are systems on a chip, complete with their own microcontroller and memory that can control your entire blinking LEDs project. Developing for these radio modules is a bit of a challenge, as the IDEs and compilers cost several thousand dollars. [Tim]’s entry for the Hackaday Prize looks at one of these Bluetooth LE modules – Texas Instrument’s CC2540 and CC2541 – and puts an embedded BASIC interpreter right on the chip.

[Tim]’s inspiration for this project came from looking at a few popular devices using the CC254X chip. Many of these included a microcontroller and the added costs, complexity, and power requirements that come along with an additional chip. This radio module could easily run any code an ATMega could, and adding another chip to a product seemed like a terrible waste, and certainly not in the spirit of open hardware and software.

The alternative is writing an interpreter for the CC254X chip. He’s chosen BASIC, but added a little bit of Arduino language syntax to make it even easier to develop on. Having already run through a few successful tests involving SPI, I2C and 1-wire devices, [Tim] has a basic system working, but [Tim] admits it does need a little rework to make it easier to use.

It’s a great project, and personally astonishing that it didn’t make the quarterfinal selection for The Hackaday Prize. [Tim] is still working on his project, though, in a great example of extrinsic motivation; he doesn’t need a trip to space to convince him to build something cool.

You can check out [Tim]’s two minute concept video below.


SpaceWrencherThis project is an official entry to The Hackaday Prize that sadly didn’t make the quarterfinal selection. It’s still a great project, and worthy of a Hackaday post on its own.

Continue reading “Extrinsic Motivation: BASIC For Bluetooth”

The Most Basic BASIC Computer

AVR microcontrollers can do pretty much anything nowadays. Blinking LEDs, handling sensor inputs, engine control modules, and now, thanks to [Dan], a small single chip BASIC computer with only ten parts (and four of them are capacitors).

[Dan]’s homebrew computer has it all. The ATmega 1284P microcontroller outputs a composite video signal and handles inputs from a PS/2 keyboard. The microcontroller runs at 16 MHz, has 7 kB of memory for programs, and can use a separate EEPROM to store data. It also has an array of GPIO pins for interacting with the physical world.

For software, the microcontroller runs a version of BASIC called Tiny BASIC plus, which is a stripped-down language that can fit in 3 kB of memory. This is crucial if you’re in the 1970s or if you’re programming on an AVR microcontroller in the 21st century.

We’ve seen other Arduinos and AVR-type microcontrollers that can run BASIC, but this one has a great form factor and clean look. It’s also a great way to get familiar with homebrew computing and the BASIC programming language!

An FPGA Based 6502 Computer

A diagram of the CHOCHI Board

It’s no secret that people love the 6502 processor. This historic processor powered some of our favorite devices, including the Apple II, the Commodore 64, and the NES. If you want to play with the 6502, but don’t want to bother with obtaining legacy chips, the CHOCHI board is for you.

While many people have built modern homebrew 6502 computers, the CHOCHI will be much easier for those looking to play with the architecture. It’s based on a Xilinx XC3S50 FPGA which comes preconfigured as a 6502 processor.

After powering on the board, you can load a variety of provided binaries onto it. This collection includes a BASIC interpreter and a Forth interpreter. Of course, you’re free to write your own applications in 6502 assembly, or compile C code for the device using the cc65 compiler.

If you get bored with the 6502 core, you can always grab Xilinx’s ISE WebPACK for free and use the board as a generic FPGA development tool. It comes with 128K of SRAM and 31 I/O pins. Not bad for a $30 board.