LCD support added in Searduino

I’ve bought some Arduino HW to play around with over Christmas. One of the things I bought was an LCD. After a while i realised LCD support was missing in Searduino[1] so I hacked one. Read more about it here:

http://searduino.wordpress.com/2013/12/28/partial-lcd-support-in-searduino-not-complete-but-ready-for-use/

I will start looking into the photo resistors, led matrices, … and all the other stuff I bought. Perhaps more will come in Searduino? How about a generic way to write your own simulated hardware with a nice GUI, e g write a photo resistor simulator that uses the Analog Input.

BTW; I am using VMM[2] from TestingMachine[3] to build Searduino (nightly builds and tests) on Raspberry Pis. More on this another day.

[1] http://searduino.wordpress.com/

[2] https://github.com/tis-innovation-park/tm-vmm

[3] https://testingmachine.eu/

Examples in manuals – how to verify (test) them

I’ve gotten some just comments as feedback for the examples in the Searduino Manuals. Searduino is a software to make it easy to program C/C++ for Arduino, a simulator for source level Arduino API, … and more.

Problem is the following: I’d written some examples to make it easy to get started with Searduino. After some weeks of updates to the code the examples were not correct anymore. What good is it to have examples if they don’t work? But on the other hand, it’s really a pain in the ¤/&% to have to update example code. We need a way to test example code in manuals and to automate the tests!

Copying/pasting code from a manual is not something that is not desired (error prune to say one problem). So how to find some middle ground here? Is there any software for this?

My temporary solution was to write all examples as C files and Makefiles and to write some scripts to

  • convert a C file to texinfo file (c2texi)
  • convert a Makefile file to texinfo file (makefile2texi)

and then include the generated texi files in the manual (written in Texinfo). Will probably do the same for GNU Xnee

There must be  a better way … or?

 

libarduino – hacked it a bit

Found a lib the other day that can be used instead of the Arduino IDE. The library is called libarduino.  Using the lib means I can switch entirely to using C when teaching embedded at Gothenburg University/IT University. Only real problem was that the library really wasn’t prepared for producing a stand alone library or for being installed and will therefor not be that easy to use for the students. So I started hacking the makefiles to solve the problems. And now I have a libarduino that creates a static archive (library) and can be installed for later use by other programs (linking the libarduino library (libarduino.a)).

Cool thing is that the makefile for the new program becomes really small. For a new program, do a Makefile looking something like this:

SRC=test1.c
PROG=test1
include <your path>/libarduino/arduino.mk

… and you can now do (among other things)

make

make install

the last target install the application to your arduino.