Java famously runs on billions of devices, including workstations, desktops, tablets, supercomputers, and jewelry. Yes, jewelry. Look it up. [Michael] realized Java doesn’t run on Commodore 64s, TI-99s, and a whole bunch of other platforms. Not anymore.
Last year, [Michael] wrote Java Grinder, a Java byte-code compiler that compiles classes into assembly language instead of being part of a JVM. This effectively turns Java from a Just In Time compiled language to a normally compiled language, like C. He wrote this for the 6502/6510, the MSP430, and a Z80. The CPU in the TI-99/4A is a weird beast, though, and finally [Michael] turned this Java Grinder on that CPU, the TMS9900.
While most of the development was accomplished with the MESS emulator, [Michael] did manage to run Java on real hardware. His friend gave him a TI-99/4A a few years ago with a few cartridges. Cracking those cartridges open revealed one PCB that would hold an EEPROM. Writing his Java byte-code-derived assembly to a 28c64 EEPROM, he had a cartridge that would run compiled Java.
Right now, the demo is pretty simple with low-resolution graphics beeps and bloops of music, and generally not what you would expect from a TI/99. This is mostly due to the fact that the API for the TI-99 is extremely simple. You can check out the results of that programming endeavor below.
Continue reading “Java Byte Code, Ahead Of Time Compilers, And A TI-99”
We’re no strangers to home automation projects around here, but it’s not often that you see one described in this much detail. [Paul] designed a custom home automation system with four teammates for an undergraduate thesis project.
The system is broken into two main components; the server and the peripherals. The team designed their peripherals from early prototypes of an upcoming ArduIMU v4 measurement unit. They removed all of the default sensors to keep costs down and reduce assembly time. The units can them be hooked up to various peripherals such as temperature sensors, mains relays, RGB color strips, etc.
The central management of the system is performed using a web-based user interface. The web server runs on Java, and interacts with the peripherals wirelessly. Basic messages can be sent back and forth to either read the state of the peripherals or to change the state. As far as the user is concerned, these messages appear as simple triggers and actions. This makes it very simple to program the peripherals using if, then, else logic.
The main project page is a very brief summary of what appears to be a very well documented project. The team has made available their 182 page final report (pdf), which goes into the nitty-gritty details of the project. Also, be sure to watch the demonstration video below. Continue reading “Home Automation with a Custom Wireless Sensor Network”
[Michael Kohn] sent in a link to the set of projects he’s been working on lately. The Java Grinder is a project that converts Java code for use on microcontrollers. This actually started back in 2009, when he mentioned that the project was worthless because there were already a ton of Java virtual machines out there. But if he had really thought that he’d never learn anything. We’re glad [Michael] picked this back up and made something out of it.
The image above shows the proof of concept. It’s a box bouncing around the Nokia 6100 screen. He wrote the animation in Java, and used his grinder to turn the code into dsPIC assembly, which was then compiled and flashed onto the microcontroller. That’s not all, he’s also coded a Mandelbrot set generator or the same hardware. As it stands he can also produce assembly code for use on MSP430 chips.
This kind of exploration is great for the brain. We see it as a natural extension of the learning you acquire from Nand2Tetris which walks through the essential text The Elements of Computing Systems. If you’re not familiar, that’s a trip from building your first logic gate, which you plunk together with others to build an ALU, then start coding all the way up to a virtual machine to run on your simulated hardware.
Video of the bouncing box and Mandelbrot set is below.
Continue reading “Java Grinder Spits Out dsPIC and MSP430 Assembly Code”
[Kay Choe] can’t play the piano. Rather, he couldn’t, until he converted his keyboard to include LED-guided instruction. [Kay] is a microbial engineering graduate student, and the last thing a grad student can afford is private music lessons. With $70 in components and a cell phone, however, he may have found a temporary alternative.
The build works like a slimmed-down, real-world Guitar Hero, lighting up each note in turn. We’ve seen a project like this before, with the LEDs mounted above the keys. [Kay]’s design, however, is much easier to interpret. He embedded the LEDs directly into the keys, including ones above each black key to indicate the sharps/flats. An Android app takes a MIDI file of your choice and parses the data, sending the resulting bits into an IOIO board via USB OTG. A collection of shift registers then drives the LEDs.
For a complete novice, [Kay] seems to benefit from these lights. We are unsure whether the LEDs give any indication of which note to anticipate, however, as it seems he is pressing the keys after each one lights up. Take a look at his video demonstration below and help us speculate as to what the red lights signify. If you’re an electronics savant who wants to make music without practicing a day in your life, we recommend that you check out [Vladimir’s] Robot Guitar.
Continue reading “LED-Guided Piano Instruction”
We think we have found project that will take over our holiday free time. [Bai Li] just published an excellent article about writing a program that can automatically solve the game of Minesweeper. For those of you who are unfamiliar, Minesweeper gives you a grid in which land mines have been randomly placed. As you click on boxes to reveal what is underneath you are greeted with a number which represents how many mines surround that box. [Bai’s] project examines how the puzzle may be solved programmatically.
He chose to use Java to write the solver. This works well both reading from the screen as well as simulating mouse clicks on the game. The reading portion of the program uses color detection with a screenshot. There were two problems associated with this, the numeral one is almost the same color as an uncovered square, and the numerals seven and three use identical colors. The input portion was much simpler as he’s able to use the existing Robot class.
The logic behind writing an efficient solver is very interesting. One of the most fascinating examples is shown above. What should you do when there is no possible way to ensure a safe move? As with traditional chess games, [Bai] has the solver calculate all possible solutions and choose the move that has the best odds of success.
His source code is available, but won’t this one be fun to hack out from the concepts alone? For some reason this seems more accessible to us than something like the Bejeweled Blitz solver.
Continue reading “How to write your own Minesweeper solver”
This arm cuff is a sensor package which logs data whenever you’re wearing it. It records accelerometer data, skin temperature, and galvanic skin response. That data can then be analyzed to arrive at figures like calories burned. But… The company behind the device seems to have included a way to keep the cash flowing. Once you buy it you can read the data off of the device using a Java program they supply. But you can’t erase the data from the device unless you subscribe to their online service. Once it fills up, it’s useless. [Doug] wasn’t happy with this gotcha, so he reverse engineered the technique used to clear the BodyBugg’s memory.
There had been a few previous attempts at reverse engineering the device but that groundwork didn’t really help [Doug] on his quest. He ended up disassembling the Java classes from the original program. This helped him figure out how to initialize communications. Once there he was happy to find that the device will tell you how to use it. If you issue an invalid command it will respond with a list of all valid commands. Everything you need to get up and running can be found in his github repo.
Check out the LED cube which [Thomas], [Max], and [Felix] put together. But don’t forget to look at that beautiful PCB which drives it… nice! But hardware is only part of what goes into a project like this one. After the soldering iron had cooled they kept going and wrote their own software to generate patterns for the three-dimensional display.
Looking at a clean build like this one doesn’t drive home the amount of connections one has to make to get everything running. To appreciate it you should take a look at this other 512 LED cube which has its wires showing. You can see from the schematic (available in the project repository) that all of these lines are managed by a series of shift registers. The board itself connects to a computer from which it gets the visualization commands. A Java program they call CubeControl can push letters or turn the cube into a VU meter.
The team built at least two of these. This smaller version uses red LEDs, while the larger one shown in the video after the break has blue ones.
Continue reading “8x8x8 LED cube and the board that drives it”