text stringlengths 0 234 |
|---|
Nrf.Timers'Elab_Spec; |
Nrf.Timers'Elab_Body; |
E186 := E186 + 1; |
Nrf.Twi'Elab_Spec; |
Nrf.Twi'Elab_Body; |
E189 := E189 + 1; |
Nrf.Uart'Elab_Spec; |
Nrf.Uart'Elab_Body; |
E193 := E193 + 1; |
Nrf.Device'Elab_Spec; |
Nrf.Device'Elab_Body; |
E140 := E140 + 1; |
Microbit.Console'Elab_Body; |
E197 := E197 + 1; |
E270 := E270 + 1; |
Microbit.Accelerometer'Elab_Body; |
E268 := E268 + 1; |
Microbit.Iosfortasking'Elab_Spec; |
Microbit.Iosfortasking'Elab_Body; |
E199 := E199 + 1; |
Microbit.Radio'Elab_Spec; |
E251 := E251 + 1; |
Microbit.Timehighspeed'Elab_Body; |
E258 := E258 + 1; |
Mybrain'Elab_Spec; |
E260 := E260 + 1; |
Mymotordriver'Elab_Spec; |
E238 := E238 + 1; |
Drivingstatesfsm'Elab_Spec; |
E276 := E276 + 1; |
E274 := E274 + 1; |
Taskact'Elab_Spec; |
Taskact'Elab_Body; |
E123 := E123 + 1; |
Taskthink'Elab_Spec; |
Taskthink'Elab_Body; |
E272 := E272 + 1; |
E262 := E262 + 1; |
E264 := E264 + 1; |
Tasksense'Elab_Spec; |
Tasksense'Elab_Body; |
E247 := E247 + 1; |
end adainit; |
procedure Ada_Main_Program; |
pragma Import (Ada, Ada_Main_Program, "_ada_main"); |
procedure main is |
procedure Initialize (Addr : System.Address); |
pragma Import (C, Initialize, "__gnat_initialize"); |
procedure Finalize; |
pragma Import (C, Finalize, "__gnat_finalize"); |
SEH : aliased array (1 .. 2) of Integer; |
Ensure_Reference : aliased System.Address := Ada_Main_Program_Name'Address; |
pragma Volatile (Ensure_Reference); |
begin |
Initialize (SEH'Address); |
adainit; |
Ada_Main_Program; |
adafinal; |
Finalize; |
Function Definition: procedure SetupMotors is |
Function Body: Pins : MotorControllerPins; |
begin |
Pins.LeftFrontSpeedEnA := 0; -- set you MB pins here. Note that some pins overlap with other M:B functions! See the Microbit package to inspect which function lives on which pin. |
Pins.LeftFrontPin1In1 := 6; |
Pins.LeftFrontPin2In2 := 7; |
Pins.LeftBackSpeedEnB := 0; |
Pins.LeftBackPin1In3 := 2; |
Pins.LeftBackPin2In4 := 3; |
Pins.RightFrontSpeedEnA := 1; |
Pins.RightFrontPin1In1 := 12; |
Pins.RightFrontPin2In2 := 13; |
Pins.RightBackSpeedEnB := 1; |
Pins.RightBackPin1In3 := 14; |
Pins.RightBackPin2In4 := 15; |
MotorDriver.SetMotorPins(Pins); |
--For example set the PWM period, as you only need to do this once |
Set_Analog_Period_Us (20_000); --20 ms = 50 Hz, typical for many actuators. You can change this, check the motor behavior with an oscilloscope. |
null; |
Function Definition: procedure Test is |
Function Body: function "+" |
(Text : Wide_Wide_String) return League.Strings.Universal_String |
renames League.Strings.To_Universal_String; |
function Headless return League.JSON.Values.JSON_Value; |
-------------- |
-- Headless -- |
-------------- |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.