KyleFlores1014
Posts: 1
Joined: Sun Aug 06, 2017 10:53 am

LUA Programming

Sun Aug 06, 2017 10:57 am

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

User avatar
scruss
Posts: 1316
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: LUA Programming

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.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.

User avatar
DougieLawson
Posts: 29790
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: LUA Programming

Sun Aug 06, 2017 5:27 pm

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.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

User avatar
Gavinmc42
Posts: 1440
Joined: Wed Aug 28, 2013 3:31 am

Re: LUA Programming

Wed Aug 30, 2017 7:08 am

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.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

mattmiller
Posts: 1428
Joined: Thu Feb 05, 2015 11:25 pm

Re: LUA Programming

Wed Aug 30, 2017 8:00 am

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

Return to “Other languages”

Who is online

Users browsing this forum: No registered users and 1 guest