Writing Android Apps In C, No Java Required

Older Android devices can be had for a song, and in many cases are still packing considerable computational power. With built in networking, a battery, and a big touch screen, they could easily take the place of a Raspberry Pi and external display in many applications. As it so happens, Google has made it very easy to develop your own Android software. There’s only one problem: you’ve got to do it in Java.

Looking to get away from all that bloat and overhead, [CNLohr] set out to see what it would take to get 100% C code running on an Android device. After collecting information and resources from the deepest and darkest corners of the Internet, he found out that the process actually wasn’t that bad. He’s crafted a makefile which can be used to get your own C program up and running in seconds.

We mean that literally. As demonstrated in the video after the break, [CNLohr] is able to compile, upload, and run a C Android program in less than two seconds with a single command. This rapid development cycle allows you to spend more time on actually getting work done, as you can iterate through versions of your code almost as quickly as if you were running them on your local machine.

[CNLohr] says you’ll still need to have Google’s Android Studio installed, so it’s not as if this is some clean room implementation. But once it’s installed, you can just call everything from his makefile and never have to interact with it directly. Even if you don’t have any problem with the official Android development tools, there’s certainly something to be said for being able to write a “Hello World” that doesn’t clock in at multiple-megabytes.

Continue reading “Writing Android Apps In C, No Java Required”

Java On GPUs And FPGAs

There was a time when running a program on an array of processors meant that you worked in some high-powered lab somewhere. Now your computer probably has plenty of processors hiding in its GPU and if you have an FPGA, you have everything you need to make something custom. The idea behind TornadoVM is to modify OpenJDK and GraalVM to support running some Java code on parallel architectures supported by OpenCL. The system can utilize multi-core CPUs, GPUs (NVIDIA and AMD), Intel integrated GPUs, and Intel FPGAs.

If you want to try your hand at accelerated Java, there are some docker containers to get you started fast. There’ are also quite a few examples, such as a computer vision application.

Continue reading “Java On GPUs And FPGAs”

Run Java On An Amiga

In the modern world, we take certain tools for granted. High-level programming languages such as C or Python haven’t been around that long in the grand scheme of things, and Java has only existed since the ’90s. Getting these tools working on machines that predate them is more of a challenge than anything, and [Michael Kohn] was more than willing to tackle this one. He recently got Java running on a Commodore Amiga.

The Amgia predates Java itself by almost a decade, so this process wasn’t exactly straightforward. The platform has a number of coprocessors that were novel for their time but aren’t as commonplace now, taking care of such tasks such as graphics, sound, and memory handling. Any psoftware running on the Amiga needs to be in a specially formatted program as well, so that needed to be taken care of, even loading Java on the computer in the first place took some special work using a null modem cable rather than the floppy disk an Amiga would have used back in the day.

Loading Java on an antique Amiga is certainly a badge of honor, but [Michael] isn’t a stranger to Java and the Motorola 68000s found in Amigas. There’s a 68000 in the Sega Genesis as well, and we’ve seen how [Michael] was able to run Java on that too.

Continue reading “Run Java On An Amiga”

Control Lighting Effects Without Programming

Working in a theater or night club often requires a specialized set of technical skills that you might not instantly think about. Sure, the audio system needs to be set up and managed but the lighting system is often actively managed as well. For simple setups, this is usually not too difficult to learn. With more complicated systems you will need to get elbow-deep into some software. With [trackme518]’s latest tool, though, you will only need to be able to edit video.

Sure, this sounds like just trading one piece of software for another, but it’s more likely that professionals working in lighting will already know how to edit video rather than know programming or complicated proprietary lighting software. All you have to do to control a set of lights is to create a video, or use an existing one, and the lighting system will mimic the video on its own. If you do know programming, though, it’s written in Processing Java so changes aren’t too difficult to make.

The software (available on the project’s GitHub page) will also work outside of a professional environment, as well. It’s set up to work with DMX systems as well as LED strips so you could use it to run a large LED display board using only an input video as control. You could even use it to run the display on your guitar.

Photo courtesy of Rob Sinclair (Gribiche) [CC BY-SA 2.0 (https://creativecommons.org/licenses/by-sa/2.0)]

A Tiny IDE For Your ATtiny

When writing code for the ATtiny family of microcontrollers such as a the ATtiny85 or ATtiny10, people usually use one of two methods: they either add support for the chip in the Arduino IDE, or they crack open their text editor of choice and do everything manually. Plus of course there are the stragglers out there using Eclipse. But [Wayne Holder] thinks there’s a better way.

The project started out as a simple way for [Wayne] to program the ATtiny10 in C under Mac OS, but has since evolved into an open source, cross-platform integrated development environment (IDE) for programming a wide range of ATtiny chips in C, C++, or Assembly. Not only does it integrate the source code editor and programmer, but it even bundles in documentation for common variants of the chips including block diagrams and pinouts; making it a true one-stop-shop for ATtiny hacking.

His IDE runs under Java, including OpenJDK, and [Wayne] provides a stable pre-built executable for those who don’t want to clone the whole GitHub repository. He’s included the GNU/AVR toolchains, though notes that testing so far has been limited to Mac OS, and he’s interested in feedback from Windows and Linux users. Assembly is done either with GNU AVR-AS, or an assembler of his own design, though the latter is currently limited to the ATTiny10.

To actually get the code onto the chip, the IDE supports using the Arduino as a programmer as well as dedicated hardware like the BusPirate or the USBasp. If you go the Arduino route, [Wayne] has even come up with a little adapter board which he’s made available through OSH Park to help wrangle the diminutive chips.

The ATtiny10 might have something of a learning curve, but in exchange this family of tiny microcontrollers offers an incredible amount of capability. When you’re working with what’s essentially a programmable grain of rice, the only limit is your own creativity.

Maze Generator Keeps Plotter (and Kids) Busy

We can tell that [Jon Howell] is our kind of guy. After updating his vintage 1985 Hewlett-Packard plotter with WiFi and the ability to load SVG files, he obviously needed to find a bunch of stuff to run off with it. Gotta justify those hacks somehow. So he doubled down and decided support a hack with another hack by writing a maze generator to keep his plotter well fed. He was kind enough to unleash his creation on an unsuspecting Internet as an open source project, and now we all can benefit from a couple of reams worth of mazes.

The generator itself is written in Java, and should work on whatever operating system your box happens to be running thanks to the *nix and Windows wrapper scripts [Jon] provides. To create a basic maze, one simply needs to provide the script with the desired dimensions and the paper size. You can define the type of paper with either standard sizes (such as --paper a4) or in the case of a plotter with explicit dimensions (--paper 36x48in).

If you aren’t a big fan of right angles, there’s support for changing the internal geometry of the maze to use a hexagonal or triangle grid. You can even pass the program a black and white PNG “mask” which it will use as the boundaries for the maze itself, allowing for personalized puzzles of whatever shape catches your fancy. [Jon] even ran the Wrencher though his software, leading to the creation of a maze which we can neither confirm nor deny will be making an appearance on our Christmas cards this year.

Whether you need to prove to your significant other that the hours you spent fiddling with your plotter are well spent, or an easy way to entertain the junior humans in your life, you can thank [Jon] for your solution.

A Whole Other Kind Of Graphical Programming

Java isn’t everyone’s cup of tea. With all its boilerplate and overhead, you’re almost always better off with a proper IDE that handles everything under the hood for you. However, if you learn a new language, you don’t really want to be bothered setting up a clunky and complex IDE. If only you could use a simple, standard Windows program that you are most likely already familiar with. This wish led [RubbaBoy] to create the MSPaintIDE, a Java development environment that let’s you write your code in — yes — MS Paint.

If you’re thinking now that you will end up writing your program with MS Paint’s text tool and create a regular image file from it — then you are right. Once set up, MSPaintIDE will compile all your PNG source files into a regular Java JAR file. And yes, it has syntax highlighting and a dark theme. [RubbaBoy] uses a custom-made OCR to transform the image content into text files and wraps it all into few-button-click environment — including git integration. You can see a demonstration of it in the video after the break, and find the source code on GitHub.

One has to truly admire how far [RubbaBoy] went, considering the tongue-in-cheek nature of this project. And all joking aside, if you’re interested in OCR, this might just be simple enough to begin with. Or you could expand it with some text to speech functionality.
Continue reading “A Whole Other Kind Of Graphical Programming”