Microcontroller

How to use a microcontroller
Microcontrollers are parts that are used to run code. You use the hammer tool to configure what it will run, however it is highly recommended to program somewhere else, such as notepad or roblox studio, and then copy and paste the code into the configure. Note that if your code is more then 2000 characters long you will need to upload it to github and paste the raw link in the configure. Microcontrollers are turned on with polysilicon when powered. Below is a diagram showing how to use ports and ethernetcables.



Microcontroller related parts

 * Port
 * EthernetCable
 * Keyboard
 * Microphone
 * Disk
 * Modem
 * Screen
 * TouchScreen
 * LifeSensor
 * Speaker
 * Instrument
 * Rail
 * StarMap
 * Telescope

= Programming =

Microcontrollers run on Pilot.lua, which is basically just normal lua with a few things added to interact with the game.

GetPartFromPort
Gets the first part it finds connected to the port

TriggerPort
Sends a trigger signal from a port

Beep
Makes the microcontroller beep

:Configure
Configure can be run on any part. It works like configuring with hammer tool.

:Trigger
Simulates the part receiving a trigger signal

:ConnectToEvent
Connects to a parts event, such as a keyboard input.

i will add more later