Giter Site home page Giter Site logo

lua-input's Introduction

Hi there πŸ‘‹

My name is Max Sahm. On the Internetβ„’ I go by max1220.

You've found my GitHub profile. Here I publish my software projects, usually developed just for fun or to solve some problem I have.

  • ⌨ I’m currently working on a small CPU design called t3lc
  • πŸŒ• My programming language of choice is Lua
  • 🌊 For Lua I've also learned & now am fluent in C.
  • πŸ‘Š I’m also writing a lot of Bash scripts ...
  • 🌐 I've learned HTML when I was 8, some CSS and JS not much later
  • 🐧 I mostly use Debian Linux. Linux is cool πŸ•Ά

I have a homepage at max-sahm.de.

You can reach me by writing an e-mail to [email protected]. I'm a native german speaker, and I'm also fluent in english.

Issues, comments, pull requests, etc. are always welcome!

Have a nice day :)

lua-input's People

Contributors

max1220 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

rrrnld

lua-input's Issues

init.lua:31: bad argument #1 to 'func' (FILE* expected, got nil)

Hi,

tried this simple example:

local input = require("lua-input")

-- read events from a device
local input_dev = input.open_input("/dev/input/event3")
while true do
	local ev = input_dev:read_event()
	print("event",ev.type, ev.code, ev.value)
end

got the following error:

lua: /usr/local/share/lua/5.3/lua-input/init.lua:31: bad argument #1 to 'func' (FILE* expected, got nil)
stack traceback:
	[C]: in function 'input.read_event'
	/usr/local/share/lua/5.3/lua-input/init.lua:31: in method 'read_event'
	input-event3.lua:6: in main chunk
	[C]: in ?

error loading module 'input' from file '/usr/local/lib/lua/5.2/input.so'

Hi

Installed and cross compiled lua-input according to the Manual installation on this Linux system:

uname -a
Linux (none) 4.1.15-00838-g349fbf5767c #90 SMP PREEMPT Thu Sep 15 15:12:23 CST 2022 armv7l GNU/Linux

Start the Lua interpreter:


~ # lua
Lua 5.2.2  Copyright (C) 1994-2013 Lua.org, PUC-Rio
> local input = require("lua-input")
error loading module 'input' from file '/usr/local/lib/lua/5.2/input.so':
        dynamic libraries not enabled; check your Lua installation
stack traceback:
        [C]: in ?
        [C]: in function 'require'
        /usr/local/share/lua/5.2/lua-input/init.lua:1: in main chunk
        [C]: in function 'require'
        stdin:1: in main chunk
        [C]: in ?

Any hint to solve this problem?

BTW, it works fine on a Raspberry Pi (Linux 5.10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.