Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- serialize this structure:
- dataroot = {
- packetid:string
- type:int
- cmd:string
- data:various
- }
- 1. init connection
- packetid: new packetid
- type: 1
- cmd: nil
- data: nil
- 2. send printer command
- packetid: same you used for init
- type: 3
- cmd: printercommand to execute
- data: table which has the params for the command
- 3. start actual printing:
- packedid: you guessed it, same you used for init
- type: 2
- cmd: nil
- data: nil
- every command should return the result(type = 5: error, type=6: success)
- use timout for rednet.read() though
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement