Difference between revisions of "Component: GameCode (Misc Circuit)"
From Flowcode Help
Jump to navigationJump to search| (2 intermediate revisions by one other user not shown) | |||
| Line 17: | Line 17: | ||
==Component Source Code== | ==Component Source Code== | ||
| − | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/ | + | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_GameCode_Master.fcfx FC_Comp_Source_GameCode_Master.fcfx] |
| − | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/ | + | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_GameCode_Master.fcfx FC_Comp_Source_GameCode_Master.fcfx] |
==Detailed description== | ==Detailed description== | ||
| Line 61: | Line 61: | ||
==Examples== | ==Examples== | ||
| − | + | ''<span style="color:red;">No additional examples</span>'' | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
==Macro reference== | ==Macro reference== | ||
| Line 442: | Line 391: | ||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
| − | |||
| − | |||
Latest revision as of 16:22, 20 April 2023
| Author | Jef De Bruyne |
| Version | 1.0 |
| Category | Misc Circuit |
Contents
GameCode component
A small handheld device designed for creating embedded games. Complete with a 8 x 16 LED display, 4-Way DPAD with 4 additional push switches Buzzer, Vibration, MP3 Player, Potentiometer and Lithium battery management. Programmed via USB.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_GameCode_Master.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_GameCode_Master.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
BatteryRead
| BatteryRead | |
| Read and return the voltage level of the battery in millivolt. | |
| Return | |
DisplayBrightness
| DisplayBrightness | |
| Control the brightness of the display. | |
| Value | |
| Enter value from 0 to 15 | |
| Return | |
DisplayClear
| DisplayClear | |
| Clear the display. | |
| Return | |
DisplayWrite
DisplayWriteNumber
| DisplayWriteNumber | |
| Show a number ranging from 000 to 999 on the display. Number is printed vertically. | |
| Value | |
| Enter a number from 0 to 999. | |
| Return | |
EEReadValue
| EEReadValue | |
| Retreives a value from none volitile memory | |
| Address | |
| Address to write to, Range: 0-255 | |
| Return | |
EEStoreValue
| EEStoreValue | |
| Saves a value to none volitile memory | |
| Address | |
| Address to write to, Range: 0-255 | |
| Value | |
| Value to store, Range: 0-255 | |
| Return | |
Initialise
| Initialise | |
| Initializes all present hardware and communication. Place this at the very start of your code. | |
| Return | |
LedsWrite
| LedsWrite | |
| Set the button-leds. MSB = leftmost led LSB = rightmost led | |
| Value | |
| MSB = leftmost dot, LSB = rightmost dot | |
| Return | |
MP3GetStatus
| MP3GetStatus | |
| Returns the status of the MP3 module. 0 = module in sleep 1 = track is playing 2 = track is pauzed 3 = track is stopped | |
| Return | |
MP3PausePlayResetStop
| MP3PausePlayResetStop | |
| Allows the current playing track to be paused, restarted or stopped. | |
| Mode | |
| 0=Pause, 1=Play, 2=Reset, 3=Stop | |
| Return | |
MP3PlayTrack
MP3SendCommand
| MP3SendCommand | |
| Send commands to MP3 module. Check datasheet for info. | |
| Command | |
| Para1 | |
| Para2 | |
| Return | |
MP3SetVolume
| MP3SetVolume | |
| Sets the volume level for the MP3 module | |
| Volume | |
| Range: 0 (min) - 30 (max) | |
| Return | |
PlayNote
PotRead
PwrLedSet
| PwrLedSet | |
| Control the PWR LED. 0 = red + green 1 = red 2 = green | |
| Value | |
| 0 = red + green, 1 = red, 2 = green | |
| Return | |
Property reference
| Properties | |
| LED Colours | |
| LED On | |
| LED Off | |
| Display Colours | |
| On Colour | |
| Off Colour | |
| Background Colour | |