WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Busybox-httpd + GPIO  (Read 7653 times)

Offline gavinmc42

  • Sr. Member
  • ****
  • Posts: 301
Re: Busybox-httpd + GPIO
« Reply #15 on: September 17, 2015, 09:33:31 PM »
Hi Greg,

No right answer, with Linux the right answer is the first one that works, from a few million methods?
I do prefer the one or a few lines of code solution compared to libraries that must be compiled with dependencies.

Don't forget SVG:)
I use it for plotting data on the web pages.
Inline SVG makes for bigger html files but with Awk and Sed easy to modify.
Er, big here is relative, 2k becomes a 8k html file size.
Just don't expect fast updates ;) once per minute no problem.
Once per second with shell, updating is a problem.
Micropython/lua/Luajit, SVG plotting problem solved?

11,000 lines of script? ouch.

I only started Linux with the Raspberry Pi 3 yrs ago.
Did the simple Raspbian, Python, Pygame, Pyserial, python-smbus, gnuplot etc.
4GBs of OS and files and libraries etc. Keeping it updated was a pain.
Just backing up the SD Card version 8GB every time, lots of versions = lots of HD space.
Turns out not so simple, but it only took 8 days to port the python code from a mini ITX PC box to to Raspbian on Pi.
Original code on the Xbuntu PC took 8 months.

Then I found TinyCore on Pi, started playing with it around version 4.x-5?
This week I am finally happy to say nearly every previous project could have been done with just those methods.
piCore, HTML, Shell, CCS, CGI, SVG, JS and the only tcz's, OpenSSH, MC, i2c-tools, busybox-httpd.

Now with Bela making Micropthon part of the standard piCore and with Lua and Luajit, some higher speed scripting can be done.
Might need to compile C one day, but can still do lots with just the above.
Some of these tools are 25+ years old, Bash 1989, HTTP < 1991, CGI 1993.
Yet we are running it on a linux kernel Bela compiled last week or on 7.0Alpha 5 tomorrow?
Also with this low level way of doing stuff you feel more in control and know how everything works.
With lots of library stuff you need to rely on someone else's example code to figure how things work.

Regards
Gavin