Page 1 of 1

LUA Programming

Posted: Sun Aug 06, 2017 10:57 am
by KyleFlores1014
My main programming language is LUA. Can I program in raspberry pi using lua? I was thinking of programming my ssd1306 using LUA Im a beginner at python and Im really having a hard time at understanding

Re: LUA Programming

Posted: Sun Aug 06, 2017 4:57 pm
by scruss
Looks like lua-periphery is the only GPIO library for Lua that's even remotely being maintained.

The older rpi-gpio code does not support the Raspberry Pi 2 or 3.

Re: LUA Programming

Posted: Sun Aug 06, 2017 5:27 pm
by DougieLawson
scruss wrote:
Sun Aug 06, 2017 4:57 pm
Looks like lua-periphery is the only GPIO library for Lua that's even remotely being maintained.

The older rpi-gpio code does not support the Raspberry Pi 2 or 3.
That library is based on Ben Croston's python GPIO. So it may be possible to fix it by replacing the cpuinfo.c program in there with the working version from https://sourceforge.net/p/raspberry-gpi ... /cpuinfo.c

If I could spell Lua and had any interest in twiddling GPIOs using Lua I'd have a go at that hack.

Re: LUA Programming

Posted: Wed Aug 30, 2017 7:08 am
by Gavinmc42
It has been a while but I did a simple GPIO toogle benchmark ok Micropython/Lua/Luajit in piCore
http://forum.tinycorelinux.net/index.ph ... ,57.0.html

Don't remember trying this in Raspbian.

Re: LUA Programming

Posted: Wed Aug 30, 2017 8:00 am
by mattmiller
Lua and Python are not too dissimilar (I learnt Lua on NodeMCU after Python on Pi and didn't find it too hard)


Using Lua on Pi - you are new to Pi and not many people can help you

or

Using Python on Pi - you are new to Python but many people can help you