DuhMunk
DuhMunk

Reputation: 21

Error: loading module 'periphery' : undefined symbol: lua_gettop (RaspberryPi-ThingWorx)

I am using ThingWorx to reach out to my Raspberry Pi and try to retrieve motion data from a PIR Sensor connected to the Raspberry Pi. It communicates via Lua Script. To test it out I created a Lua Script separate from the ThingWorx server and used the 'periphery' module to access the input from the GPIO pin. It works fine. But when running the script through the EMS for ThingWorx, I get the error 'Error: error loading module 'periphery' from file 'usr/local/lib/lua/5.1/periphery.so: undefined symbol: lua_gettop'

Here is a snippet of the code that works on its own but not when used for the EMS:

local GPIO = require('periphery').GPIO
local GPIO_in = GPIO(4,"in")
local value = GPIO_in:read()

Edit: I did not solve that particular error, but I solved my issue by just running the lua script on its own, sending that data to a txt file, then in the lua script for the EMS, I just read the data from the txt file to be able to send to ThingWorx.

Upvotes: 1

Views: 177

Answers (0)

Related Questions