Arduino

This is where I'll be posting what I'm doing with Arduino boards. If you don't know what they are, have a look on the Arduino web site

The projects will be in varying stages of completion, so don't expect anything to be perfect, or even useful!

The basic idea is to produce a re-usable library that will allow simple commands to be interpreted at run-time by the Arduino itself. There will be a small set of built-in commands, and many more can be added by programmers as required for their project.

The library will enable the Arduino to be manually controlled by an operator entering commands (for debugging, or to trigger events and change the configuration on an adhoc basis). It will also allow commands to be stored for later execution (changing the normal programmed behaviour of the application without having to recompile and reload the Arduino).

Read more about Breeze

I've been looking for a way to store data in a file on an SD card connected to an Arduino. I wanted a re-usable way of storing lists of data that can be directly retrieved quickly by supplying a “key”, or read sequentially (preferably sorted into “key” order). This way of accessing data is called “indexed sequential access method” or ISAM for short.

One of the uses of this library would be to store the variables used by my Command Script Interpreter mentioned above. This would free up Arduino memory, as the variables would be stored on the external SD card instead if internal RAM.

I also plan to use an AVL Tree to store the current program within my Command Script Interpreter, again saving precious Arduino memory. The program lines would be keyed by line number, so they can be automatically sorted into the correct order and retrieved sequentially, or directly (when a goto command is executed).

Read more about AVL Tree

The intention is to create a generic web server running on a WeMos D1 R1 Arduino compatible board with an SD Card shield. Other boards will be supported after the initial release.

The project will handle the basic networking requirements and the HTTP protocol. Cookies, sessions, query and post data will be made available via a simple API for programmers to hook into the framework to add their own functionality.

Files placed in the “/WEBSPACE/” folder on the SD card will be automatically served as requested by the browser. Files outside this folder will not be directly accessible to users. If a folder name (rather than a file name) is specified, then it is assumed the user wants to look at “INDEX.HTM” in that folder. If the requested file is not available, the usual 404 error is returned to the browser.

Requests for files in some “virtual folders” can be intercepted by the programmer and handled by their own C function instead.

Requests for files of a certain type may also be intercepted and processed in a special way.

I'm looking at creating a program that will make it easy to animate a marionette linked to servos.

A number of servo motors will need to operate at the same time and at different speeds. These actions need to be described in a way that is easy to configure and replay. I'm sure someone else has already come up with a data file format that describes this - I just need to find it and write a program to understand it.

After that is done, it should be a trivial matter to make the puppet react to sounds or changes in light, by adding a few extra detectors. It could also be controlled using my Command Script Interpreter or Web Server.

Read more about Marionette

I have a problem with certain delivery companies. They don't seem to train their people to recognise and use a doorbell. They tap lightly on my door, so as not to disturb me, then run away with my parcel.

One obvious way to solve this problem would be to put a sign on my door saying “please ring the bell”. Unfortunately as my street is near to a school, I suspect many of the children who pass by each day would gladly accept the invitation.

So the idea I'm thinking of is to make a small Arduino project that can detect someone tapping on the door, and respond by ringing the doorbell. The plan is to use a piezoelectric sensor to detect vibrations, filter out any background noise, then use a relay to “press” the doorbell switch for the visitor.

Another way I could detect someone knocking would be to install an ornate brass door knocker. This could be wired up on the inside of the door so that it shorts together two pins of the Arduino when it is at rest. When the visitor lifts the lever off the anvil, it would break the circuit and ring the bell before they've had a chance to knock on the door.

  • computers/arduino/start.txt
  • Last modified: 29-May-2019 16:42
  • by Steve Joynt