This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--# Main | |
supportedOrientations(LANDSCAPE_RIGHT) | |
displayMode(OVERLAY) | |
-- CodeaBalls | |
-- Use this function to perform your initial setup | |
function setup() | |
edge1 = physics.body( EDGE, vec2(0,0), vec2(WIDTH,0) ) | |
edge1.type = STATIC | |
edge1.sleepingAllowed = false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local LuaTable = { | |
_VERSION = 'LuaTable v1.0.2 2016/08/27', | |
_AUTHOR = 'RamiLego4Game', | |
_URL = 'https://gist.github.com/RamiLego4Game/f656f5c1a118f77c3b7a08f4c65efaaf', | |
_DESCRIPTION = 'A library that converts tables to Lua code that can be saved', | |
_LICENSE = [[ | |
MIT LICENSE | |
Copyright (c) 2016 Rami Sabbagh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return { | |
name = "Verbose Saving", | |
description = "Verbose File Saving, saves a copy of each file on save in a spereate directory with data and time appended to the file name.", | |
author = "Rami Sabbagh", | |
version = 1.0, | |
splitFilePath = function(path) | |
local p,n,e = path:match("(.-)([^\\/]-%.?([^%.\\/]*))$") | |
n = n:sub(0,-(e:len()+2)) | |
return p,n,e |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- You have to add this to zbs user.lua configuration file | |
verbose_folder = "C:/Users/Your_User/Documents/ZBS Backup/" --For example, you must use / , and be sure that the path ends with / |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--Creating the elements-- | |
local elem_group = "MLUA" | |
local elem_names = { "LMPU", "LCBL", "LPIN", "LMRC", "LROM" } --The names of the elements to allocate | |
local elem_id = {} --A table containing the ids of every name in elem_names, [name] = id. | |
local elem_name = {} --A table to get the name from the id | |
--Allocate the elements | |
for k, name in ipairs(elem_names) do | |
if elements[elem_group.."_PT_"..name] then elements.free(elements[elem_group.."_PT_"..name]) end --Incase the script errored | |
local id = elements.allocate(elem_group, name) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--LED Matrix RAMI | |
local json = dofile("/home/pi/Desktop/Matrix/json.lua") | |
local socket = require("socket") | |
local periphery = require('periphery') | |
local GPIO = periphery.GPIO | |
print("Using GPIO:",GPIO.version) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--HD44780 LCD Driver by Rami Sabbagh | |
--Licensed under MIT | |
local bits = require("bit") | |
local band,bor,lshift,rshift = bit.band, bit.bor, bit.lshift, bit.rshift | |
local socket = require("socket") | |
local periphery = require('periphery') | |
local GPIO = periphery.GPIO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Copy of deleted topic: https://www.reddit.com/r/gamedev/comments/jumvi5/dualsense_haptics_leds_and_more_hid_output_report/ | |
--- | |
outputReport[0] = 0x02; // report type | |
outputReport[1] = 0xff; // flags determiing what changes this packet will perform | |
// 0x01 set the main motors (also requires flag 0x02); setting this by itself will allow rumble to gracefully terminate and then re-enable audio haptics, whereas not setting it will kill the rumble instantly and re-enable audio haptics. | |
// 0x02 set the main motors (also requires flag 0x01; without bit 0x01 motors are allowed to time out without re-enabling audio haptics) | |
// 0x04 set the right trigger motor |