Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
block:microcontroller [2015/06/10 01:04]
rashy
block:microcontroller [2015/06/10 01:34]
rashy
Line 5: Line 5:
  
 Microcontrollers can be built by placing a [[item:​microcontrollercase|Microcontroller case]] in an [[block:​assembler|Assembler]]. Higher tier [[item:​microcontrollercase|Microcontroller cases]] can take more components and upgrades (as well as higher tier components and upgrades). Microcontrollers take a limited subset of upgrades, and do not contain Upgrade or Card container slots. [[item:​graphics_card|Graphics cards]] cannot be placed into the expansion slots either. ​ Microcontrollers can be built by placing a [[item:​microcontrollercase|Microcontroller case]] in an [[block:​assembler|Assembler]]. Higher tier [[item:​microcontrollercase|Microcontroller cases]] can take more components and upgrades (as well as higher tier components and upgrades). Microcontrollers take a limited subset of upgrades, and do not contain Upgrade or Card container slots. [[item:​graphics_card|Graphics cards]] cannot be placed into the expansion slots either. ​
 +
 +The following code snippet illustrates one particular usage of Microcontrollers. The program detects redstone signals (requires a [[item:​redstone_card|redstone card]]), and uses a [[item:​piston_upgrade|piston upgrade]] to push a block. ​
 +```lua
 +local r,p = component.proxy(component.list("​redstone"​)()),​ component.proxy(component.list("​piston"​)())
 +
 +while true do
 +    computer.pullSignal(0.5)
 +    if r.getInput(2) > 0 then
 +        p.push()
 +    end
 +end
 +```
  
 Contents Contents