Hub

The hub library provides basic functionalities to get information about the hub as well as pause the hub's actions for a specified time in milliseconds. The information available includes the device UUID number, the Hardware ID number, and the temperature of the hub.

Sleep(integer value)

Returns

None
Pauses the hub from executing instructions for a given time in milliseconds.

Parameters

  1. 1.integervalue

    The time in milliseconds to Sleep

Example

1 2 3 use Libraries.Robots.Spike.Hub Hub hb hb:Sleep(1000)

GetDeviceUUID()

Returns

text
Returns a string of the device id.

Parameters

None

Example

1 2 3 use Libraries.Robots.Spike.Hub Hub hb text deviceID = hb:GetDeviceUUID()

GetHardwareID()

Returns

text
Returns a string of the hardware id.

Parameters

None

Example

1 2 3 use Libraries.Robots.Spike.Hub Hub hb text hardwareID = hb:GetHardwareID()

PowerOff()

Returns

integer
Turns off the Spike hub.

Parameters

None

Example

1 2 3 use Libraries.Robots.Spike.Hub Hub hb hb:PowerOff()

GetTemperature()

Returns

integer
Returns the temperature of the hub in decidegrees Celsius, which is 1/10 of a degree Celsius

Parameters

None

Example

1 2 3 use Libraries.Robots.Spike.Hub Hub hb integer currentTemperature = hb:GetTemperature()