0% found this document useful (0 votes)
8 views3 pages

NeuroCode Command List for I/O Control

The document provides a comprehensive list of commands for the NeuroCode language, categorized into sections such as Basic I/O, Delays and Timing, Analog and Digital I/O, Serial Communication, Control Structures, Servo Motor Control, Variables and Math, Lists, Buttons and Sound, Functions, Hydropump Control, and Interrupts. Each category includes specific commands for performing various tasks, such as reading/writing to pins, controlling timing, managing variables, and handling interrupts. This serves as a reference for programming with NeuroCode.

Uploaded by

kapasiaarav2
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views3 pages

NeuroCode Command List for I/O Control

The document provides a comprehensive list of commands for the NeuroCode language, categorized into sections such as Basic I/O, Delays and Timing, Analog and Digital I/O, Serial Communication, Control Structures, Servo Motor Control, Variables and Math, Lists, Buttons and Sound, Functions, Hydropump Control, and Interrupts. Each category includes specific commands for performing various tasks, such as reading/writing to pins, controlling timing, managing variables, and handling interrupts. This serves as a reference for programming with NeuroCode.

Uploaded by

kapasiaarav2
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

NeuroCode Language Command List

Basic I/O
- say "message"

- turn on pin [number]

- turn off pin [number]

- set pin [number] to output

- set pin [number] to input

- toggle pin [number]

- set pin [number] as input

- set pin [number] as input pullup

- set pin [number] as output

Delays and Timing


- wait [number] second(s)

- wait [number] millisecond(s)

- wait [number]

- wait for [number] seconds

- set timer to current millis

- if millis minus timer is greater than [number]

- if time passed is more than [number]ms

- current time in milliseconds

Analog and Digital I/O


- analog write pin [number] to [number]

- write analog [number] to pin [number]

- read analog pin A[number]

- read analog from pin [number]

- read digital pin [number]


Serial Communication
- start serial at [baudrate]

- print line "text"

- print line [variable]

Control Structures
- if pin [number] is pressed|high|low

- if [var] is equal to [number]

- if [var] is greater than [number]

- if [var] is less than [number]

- else

- end

- repeat [number] times

- forever

- while button on pin [number] is pressed

Servo Motor Control


- include servo library

- create servo called [name]

- attach [name] to pin [number]

- move [name] to [angle]

Variables and Math


- set [var] to [number]

- change [var] by [number]

- [var1] and [var2]

- [var1] or [var2]

- not [var]

- absolute of [var]

- square root of [var]


- map [var] from [a]-[b] to [c]-[d]

- random number between [a] and [b]

Lists (Arrays)
- create list [name] with size [number]

- set [list][index] to [value]

Buttons and Sound


- read button on pin [number]

- play tone on pin [number] at [freq] hz for [dur] ms

Functions
- define function [name]

- call [name]

Hydropump Control
- set pin [number] as pump output

- turn on hydropump at pin [number]

- turn off hydropump at pin [number]

Interrupts
- stop interrupts

- start interrupts

You might also like