Close
0%
0%

Arduino Desktop

The desktop with an arduino as the main processor. Multitasking, Gaming, Graphics, and (later) File IO

Similar projects worth following
Want to have a computer in your pocket other than a RPi, and easily write an OS for it? Here is the answer. An OS + the hardware for a desktop using an arduino. ON AN ARDUINO MEGA.

Hardware Specs:

  • NGT30 graphics
  • keyboard
  • Ethernet
  • SD card support
  • Extra 32KB parallel SRAM if using an awesome shield

Goals:

  • File System
  • Programs for Files (Editing, executing, displaying...)
  • Shell (Obviously)
  • daemon for displaying RAM usage (right side of screen)
  • Task Manager
  • Compilable & Executable BASIC
  • Terra (Like Terraria)

There are two software versions. One is an emulator and the other is a hard coded OS.  The hard coded one has two repos, for the older and newer versions.

I have compiled a YouTube playlist chronologically of when I created them.  Here it is:

as.py

Assembler for Some-CPU-I-haven't-named-yet (SCIHNY)

plain - 9.56 kB - 05/23/2017 at 04:22

Download

server_boot.py

Distributes bootcode for those of us without SD card support in our computers (like myself)

plain - 940.00 bytes - 05/23/2017 at 04:22

Download

mmc_assemble.py

This seems to work. For MMC CPU architecture. Use Python 3. I no longer am using MMC for this project

plain - 9.15 kB - 04/29/2017 at 03:04

Download

mmc_compile.py

Not sure this works. PYTHON 3!!! No longer used.

plain - 5.91 kB - 04/29/2017 at 03:04

Download

SomeStuff.h

Need this - it goes with NGT20_GUI_Computer.ino I am now using an emulator so this isn't used.

plain - 2.61 kB - 04/15/2017 at 07:31

Download

View all 6 files

  • 1 × NGT20 Graphics Shield
  • 1 × Arduino Mega Processor/Control Board
  • 1 × PS/2 Compatible Keyboard you can cut the connector off and plug the wires into the arduino. Or get a connector.
  • 1 × SD Card Shield (Optional) Be Careful! Ensure Mega compatibility!
  • 1 × VGA/NTSC Monitor and Cables

View all 6 components

  • GPIO Support

    Dylan Brophy10/12/2019 at 23:28 0 comments

    I added GPIO drivers, and a gpio program to test the drivers.

    Essentially I just set pin 13 to output, then set it HIGH.  And yes, it worked!  Yay!

    What's nice about the way this is programmed is that it is independent of hardware and the Arduino IDE.  the GPIO command I used uses whichever driver(s) for GPIO that it finds, regardless of what hardware this is running on.  I even can run this OS on my linux machine as a cli command.  Great for testing!

  • AVR Support

    Dylan Brophy10/11/2019 at 06:08 0 comments

    Wait - didn't this used to run on Arduino?

    Yea, in the Arduino IDE.  I am no longer using the Arduino IDE, and uploading to AVR via a makefile works great!

    After overhauling the OS I lost AVR support.  I have regained it!  Here's what the result is:

    I am still using the Arduino IDE for a serial monitor, but everything seems to work.  I still need to add support for lots of stuff now, but I'm running on a microcontroller again, which is nice.

    Anyway, I'm super excited, next I plan to add a GPIO API, so that later I can add software serial (then graphics support via an NGT30 :D)

  • Overhaul of the OS

    Dylan Brophy10/05/2019 at 04:53 0 comments

    It's been a while since I worked on this, and I see things differently now.

    First, I designed this dumb.  It's not scalable.  It was too hard to add drivers and programs and nothing was organized.

    Now I have separate directories for programs/commands and drivers.  Also, I have python scripts to configure the programs and drivers before compilation.  They are configured with JSON files that the python scripts read, and each component can be enabled/disabled.

    So I now have organization and scalability!!!  Yay!

    This is wonderful because I want to make this OS cross-platform.  I want support for more hardware, more processor types, and I want it to be usable in more ways.  For instance, to use it on microcontrollers as a usable OS in projects that need less processing power than a raspberry pi, like small robots, in home automation, and simple portables (like my #OpenPDA project).

    I definitely have a ways to go, but this is a major step.  See PR on Github here: https://github.com/NuclearManD/NTIOS_2.0/pull/1

    Note:

    1. Not as much hardware support - yet.  Only UART, NGT30, and PS2 Keyboard support
    2. No GUI anymore (can be fixed later)
    3. Added a man command
    4. Filesystem is not working, even though it is there.
    5. No multitasking at this time

    Like I said, lots of work to do!

  • basic BASIC and filesystem commands work!

    Dylan Brophy04/24/2018 at 00:58 2 comments

    Now the SD card is actually useful!  Project is now getting even more fun :D

  • SD Card working (finally!)

    Dylan Brophy12/02/2017 at 23:38 0 comments

    My arduino desktop now has a filesystem.  I can't do much with it yet, but it works. I also made some other improvements:

    1. better task manager
    2. CLI improvements
    3. new GUI color scheme

    Here is a video:

    Also, like I said in the video, I am making a board with:

    1. Arduino mega
    2. NGT20
    3. PS/2 Keyboard port
    4. SD card slot

    All in one arduino-mega sized board.

  • More alphabets and where the project is going

    Dylan Brophy08/13/2017 at 20:36 3 comments

    I love language so I decided to add some new alphabets.  I added the characters in the Cyrillic alphabet that are used in Russian, plus the characters from an alphabet I made up for fun a while back.

    Now I can print with more characters:

    On top: Hello World!

    On bottom: Hello (Informal)

    Benefits:

    1. more alphabets
    2. smaller text (so more can fit on the screen)
    3. adjustable character length

    Drawbacks:

    1. Slower loading and displaying
    2. Only white characters are supported - no green or red
    3. can't really mix with Latin alphabet due to size and interface differences

    I also ported a simple game I made for the ATmega328p a few years back:

    Other than those things, however, my project is so far somewhat useless.  The biggest drawback is that it isn't currently possible to execute some generic program:  all must be hard coded into the OS (essentially).  Well, I remember a while back reading that Java had been ported to AVR - uJ.  Adding this and enabling Ethernet would allow community made programs to be downloaded and executed to the Arduino Desktop without the aid of another computer.  Not that it has a community - but you hopefully get the point.  Java enables a useful stand alone system.  Also, since I have the extra 32KiB RAM I have more room for programs, plus graphics and keyboard....  Soon hopefully Ethernet and SD support too.

  • void system(char* input){ ... }

    Dylan Brophy08/01/2017 at 20:40 0 comments

    C++ has this function, system(), that executes a command.  If I want a command line for my arduino computer, I might as well implement this function.

    My friend, @Andrey Skvortsov, sent me an arduino shield that makes the arduino a ton more powerful.  It adds 32KB of SRAM, but its parallel, not serial.  Furthermore it maps directly into the AVR address space, so you don't have to manipulate pins.  Its basically an extra 32KB blazing fast SRAM addition for the Arduino MEGA.  I have barely used it to any potential, but I have begun making memory allocation functions and such for it, so I can go farther.  My system function actually uses the shield, and removing the shield breaks the system() function.  SO the shield works!  See that project here: #Arduino MEGA 2560 32Kb RAM shield 

    I had the arduino auto-execute these commands:

    sudo
    sudo -f
    terminate 0
    lsps

    Output:


    The sudo command is like linux : get elevated permissions.  I added sudo -f, f as in FORCE.  Basically force events to occur where possible.  So the "Self-hacking ENABLED" is from sudo -f.  terminate 0 : terminate process 0 (but there was no process, so we get error bad PID).  lsps is LiSt ProceSses.  It said "0 processes:", because no processes were executing.

    Now I am working on a terminal and will add more commands later.  Terminal, for now, will block all other processes until exit.  Multitasking terminals, as I have discovered, aren't the easiest.

  • Progress of new architecture and File System work

    Dylan Brophy05/20/2017 at 23:38 0 comments

    I took a break from this project for a while, but I have come back. I have a basic terminal with one command working, along with a file system. The terminal has only a help command that prints a string on the screen. I have working file IO now. File IO works kinda.... different. Basically instead of accessing the SD card directly by the emulated CPU in the Arduino, the SD library's functions are mapped to the CPU's emulated hardware IO. This does a few things:

    1. Makes there no need for a complex file system driver
    2. SD card library functions are faster because they are not run on an emulator
    3. I don't have to find a way to directly read/write bytes on the SD card

    Think of it like having a filesystem driver (software) mapped to your CPU's hardware IO.

    I will do something similar for network access. So that my OS can download updates to the SD card.

  • New (And superior) CPU architecture

    Dylan Brophy05/18/2017 at 03:42 0 comments

    I'm pretty much no longer going to use the old MMC architecture. I now have a simpler, faster, and generally better CPU architecture I designed. I will also use it for my FPGA computer. Most instructions are one or two bytes, as opposed to my older architectures that took WAY too many. It's still WIP, but it has run on the Arduino Desktop and works well in place of the MMC architecture.

  • Network Boot for MMC Emulator

    Dylan Brophy05/04/2017 at 04:43 0 comments

    Video Explains All

    Basically I made the MMC emulator be able to download a binary image from the internet to boot from. SUPER COOL! In my opinion :D

View all 13 project logs

Enjoy this project?

Share

Discussions

ActualDragon wrote 06/07/2018 at 17:38 point

i can see it now, we'll be winning fortnite dubs on our arduinos XD 

  Are you sure? yes | no

Dylan Brophy wrote 07/21/2018 at 05:03 point

Just wait for Arduinos with FPGA softcore accellerated graphics... :P

  Are you sure? yes | no

Mark Sherman wrote 05/23/2017 at 05:50 point

Nice!  What do you want to do for the filesystem?  I have a similar project and considered fatfs, but opted to design my own simple system.  If you built the hardware, wrote your own assembler, why not build your own fs?  I'm curious what you come up with.  Mine is based on files just being single linked lists of sectors, and a directory is just a struct of names and sector numbers stored in a 'regular' file.  No index or FAT.

  Are you sure? yes | no

Dylan Brophy wrote 05/24/2017 at 01:04 point

Basically the arduino c code (outside the emulator) replaces a large part of the kernel, including filesystem support.  I do this because I am not sure yet how to directly read/write bytes to/from the SD card in C using the libraries I have and I feel that a filesystem driver that is emulated would be too slow.  It would be more something to do on my #FPGA computer, but I would consider it on this project too.  I have designed filesystems in the past.... Before I knew how drives worked XD.  I would do it again. 

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates