Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- self.CreateLink("gyro", "ei_sensor_")
- self.gyro = self.GetLink("gyro")
- self.NextPrint = CurTime()
- function Think()
- if CurTime() > self.NextPrint then
- self.NextPrint = CurTime() + 5
- if not self.gyro.Connected then
- print("gyro not connected...")
- return
- end
- print(self.gyro.Invoke("Orientation"))
- end
- end
- OUTPUT:
- gyro not connected...
- Created link!
- 0.000 359.619 0.000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement