@educabot/educablocks-boards 0.2.35 → 0.2.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,69 +0,0 @@
1
- import type { Pin } from '../pins'
2
-
3
- export enum BOARD_ITEM_TYPE {
4
- BOOK = 'book',
5
- ROBOT = 'robot',
6
- DRONE = 'drone',
7
- BOARD = 'board',
8
- MODEL = 'model',
9
- KIT = 'kit',
10
- }
11
-
12
- export enum BOARD_TYPE {
13
- SENIOR = 'senior',
14
- JUNIOR = 'junior',
15
- MACHINE_LEARNING = 'machineLearning'
16
- }
17
-
18
- export type BoardType = 'senior' | 'junior' | 'machineLearning'
19
-
20
- export type EnabledForCode = 1 | 0
21
-
22
- export type Agent = {
23
- max: string
24
- linux: string
25
- windows: string
26
- }
27
-
28
- export enum IA_MODEL {
29
- HANDS = 'hands',
30
- IMAGES = 'images',
31
- SOUNDS = 'sounds',
32
- OBJECTS = 'objects',
33
- TEXTS = 'texts',
34
- POSES = 'poses',
35
- FACES = 'faces',
36
- }
37
-
38
- export type Board = {
39
- id: number,
40
- type: BoardType,
41
- image: string,
42
- class: string,
43
- name: string,
44
- groupImage?: string,
45
- groupPath?: string[],
46
- company: string,
47
- compilerBoard: string,
48
- agentCommandLine: Agent | string,
49
- agentSignature: Agent | string,
50
- use1200bpsTouch: boolean,
51
- fileExtension: string,
52
- profile: string,
53
- lang: string,
54
- show: number,
55
- showOnAula: number,
56
- enabled: number,
57
- enabledForCode: EnabledForCode,
58
- premium: number,
59
- elementType: BOARD_ITEM_TYPE,
60
- pins: Partial<Pin>
61
- toolboxLayout?: string,
62
- groupClass?: string,
63
- htmlValue?: string,
64
- simulator?: number,
65
- bluetooth?: number,
66
- } & (
67
- | { type: 'machineLearning'; iaModel: IA_MODEL } // Mandatory if type is "machineLearning"
68
- | { type: Exclude<BoardType, 'machineLearning'>; iaModel?: IA_MODEL } // Optional otherwise
69
- )
package/src/pins.ts DELETED
@@ -1,131 +0,0 @@
1
-
2
- export type PinSet = Array<Array<string>>
3
-
4
- export type Pin = {
5
- digital: PinSet
6
- digital1?: PinSet
7
- analog?: PinSet
8
- analog1?: PinSet
9
- pwm?: PinSet
10
- i2c?: PinSet
11
- motorPwm?: PinSet
12
- motorDC?: PinSet
13
- keyboard?: PinSet
14
- ultrasonic?: PinSet
15
- digitalServo?: PinSet
16
- joystick?: PinSet
17
- }
18
-
19
- export const ARDUINO_UNO: Pin = {
20
- digital: [['13', '13'], ['12', '12'], ['11', '11'], ['10', '10'], ['9', '9'], ['8', '8'], ['7', '7'], ['6', '6'], ['5', '5'], ['4', '4'], ['3', '3'], ['2', '2']],
21
- analog: [['A0', 'A0'], ['A1', 'A1'], ['A2', 'A2'], ['A3', 'A3'], ['A4', 'A4'], ['A5', 'A5']],
22
- pwm: [['~3', '3'], ['~5', '5'], ['~6', '6'], ['~9', '9'], ['~10', '10'], ['~11', '11']],
23
- i2c: [['IIC', 'A4,A5']],
24
- motorPwm: [['E3', '2,3,11'], ['E4', '5,4,9'], ['E6', '7,6,10']],
25
- keyboard: [['1', '13'], ['2', '12'], ['3', '11'], ['4', '10'], ['5', '9'], ['6', '8'], ['7', '7'], ['8', '6']]
26
- }
27
-
28
- export const ARDUINO_MEGA: Pin = {
29
- digital: [['53', '53'], ['52', '52'], ['51', '51'], ['50', '50'], ['49', '49'], ['48', '48'], ['47', '47'], ['46', '46'], ['45', '45'], ['44', '44'], ['43', '43'], ['42', '42'], ['41', '41'], ['40', '40'], ['39', '39'], ['38', '38'], ['37', '37'], ['36', '36'], ['35', '35'], ['34', '34'], ['33', '33'], ['32', '32'], ['31', '31'], ['30', '30'], ['29', '29'], ['28', '28'], ['27', '27'], ['26', '26'], ['25', '25'], ['24', '24'], ['23', '23'], ['22', '22'], ['21', '21'], ['20', '20'], ['19', '19'], ['18', '18'], ['17', '17'], ['16', '16'], ['15', '15'], ['14', '14'], ['13', '13'], ['12', '12'], ['11', '11'], ['10', '10'], ['9', '9'], ['8', '8'], ['7', '7'], ['6', '6'], ['5', '5'], ['4', '4'], ['3', '3'], ['2', '2']],
30
- analog: [['A0', 'A0'], ['A1', 'A1'], ['A2', 'A2'], ['A3', 'A3'], ['A4', 'A4'], ['A5', 'A5'], ['A6', 'A6'], ['A7', 'A7'], ['A8', 'A8'], ['A9', 'A9'], ['A10', 'A10'], ['A11', 'A11'], ['A12', 'A12'], ['A13', 'A13'], ['A14', 'A14'], ['A15', 'A15']],
31
- pwm: [['~13', '13'], ['~12', '12'], ['~11', '11'], ['~10', '10'], ['~9', '9'], ['~8', '8'], ['~7', '7'], ['~6', '6'], ['~5', '5'], ['~4', '4'], ['~3', '3'], ['~2', '2']],
32
- i2c: [['IIC', 'A4,A5']],
33
- ultrasonic: [['E3', '3,2'], ['E4', '4,5'], ['E6', '6,7']],
34
- motorPwm: [['E3', '2,3,11'], ['E4', '5,4,9'], ['E6', '7,6,10']],
35
- keyboard: [['1', '13'], ['2', '12'], ['3', '11'], ['4', '10'], ['5', '9'], ['6', '8'], ['7', '7'], ['8', '6']]
36
- }
37
-
38
- export const ZONDA: Pin = {
39
- digital: [['13', '13'], ['12', '12'], ['11', '11'], ['10', '10'], ['9', '9'], ['8', '8'], ['7', '7'], ['6', '6'], ['5', '5'], ['4', '4'], ['3', '3'], ['2', '2']],
40
- analog: [['A0', 'A0'], ['A1', 'A1'], ['A2', 'A2'], ['A3', 'A3'], ['A4', 'A4'], ['A5', 'A5']],
41
- pwm: [['~3', '3'], ['~5', '5'], ['~6', '6'], ['~9', '9'], ['~10', '10'], ['~11', '11']],
42
- i2c: [['IIC', 'A4,A5']],
43
- ultrasonic: [['E3', '3,2'], ['E4', '4,5'], ['E6', '6,7']],
44
- motorPwm: [['E3', '2,3,11'], ['E4', '5,4,9'], ['E6', '7,6,10']],
45
- keyboard: [['1', '13'], ['2', '12'], ['3', '11'], ['4', '10'], ['5', '9'], ['6', '8'], ['7', '7'], ['8', '6']]
46
- }
47
-
48
- export const BHOOT: Pin = {
49
- digital: [['0', 'A0'], ['1', 'A3'], ['2', '3'], ['3', '10'], ['4', '11']],
50
- digitalServo: [['0', 'A0'], ['1', 'A3'], ['2', '3'], ['3', '10'], ['4', '11']],
51
- analog: [['0', 'A0'], ['1', 'A3'], ['5', 'A6']],
52
- pwm: [['2', '3'], ['3', '10'], ['4', '11']],
53
- motorPwm: [['MD', '4,5'], ['MI', '7,6']],
54
- i2c: [['IIC', 'A4,A5'], ['IIC 2', 'A4.2,A5.2']],
55
- ultrasonic: [['0', 'A0,A1'], ['1', 'A3,A2']],
56
- joystick: [['0', 'A0,A1,A7']]
57
- }
58
-
59
- export const BHOOT_LGO20: Pin = {
60
- digital: [['0', 'A0'], ['1', 'A3'], ['2', '3'], ['3', '10']],
61
- analog: [['0', 'A0'], ['1', 'A3'], ['4', 'A6']],
62
- motorPwm: [['MD', '4,5'], ['MI', '7,6']],
63
- ultrasonic: [['0', 'A0,A1'], ['1', 'A3,A2']],
64
- }
65
-
66
- export const BHOOT_IACO: Pin = {
67
- digital: [['0', 'A0'], ['1', 'A3']],
68
- digitalServo: [['0', 'A0'], ['1', 'A3']],
69
- analog: [['0', 'A0'], ['1', 'A3'], ['2', 'A6']],
70
- motorPwm: [['MDInf', '4,5'], ['MIInf', '7,6'], ['MDSup', 'D2,D3'], ['MISup', 'D10,D11']],
71
- i2c: [['IIC', 'A4,A5']],
72
- ultrasonic: [['0', 'A0,A1'], ['1', 'A3,A2']]
73
- }
74
-
75
- export const ARDUINO_NANO: Pin = {
76
- digital: [['13', '13'], ['12', '12'], ['11', '11'], ['10', '10'], ['9', '9'], ['8', '8'], ['7', '7'], ['6', '6'], ['5', '5'], ['4', '4'], ['3', '3'], ['2', '2']],
77
- analog: [['A0', 'A0'], ['A1', 'A1'], ['A2', 'A2'], ['A3', 'A3'], ['A4', 'A4'], ['A5', 'A5'], ['A6', 'A6'], ['A7', 'A7']],
78
- pwm: [['~3', '3'], ['~5', '5'], ['~6', '6'], ['~9', '9'], ['~10', '10'], ['~11', '11']],
79
- i2c: [['IIC', 'A4,A5']],
80
- }
81
-
82
- export const ARDUINO_MICRO: Pin = {
83
- digital: [['21', '21'], ['20', '20'], ['19', '19'], ['18', '18'], ['16', '16'], ['15', '15'], ['14', '14'], ['10', '10'], ['9', '9'], ['8', '8'], ['7', '7'], ['6', '6'], ['5', '5'], ['4', '4'], ['3', '3'], ['2', '2']],
84
- // analog: [['A0', 'A0'], ['A1', 'A1'], ['A2', 'A2'], ['A3', 'A3'], ['A6', 'A6'], ['A7', 'A7'], ['A8', 'A8'], ['A9', 'A9'], ['A10', 'A10']],
85
- analog: [['A0', '18'], ['A1', '19'], ['A2', '20'], ['A3', '21'], ['A6', '4'], ['A7', '6'], ['A8', '8'], ['A9', '9'], ['A10', '10']],
86
- pwm: [['~3', '3'], ['~5', '5'], ['~6', '6'], ['~9', '9'], ['~10', '10']],
87
- i2c: [['IIC', '2,3']],
88
- }
89
-
90
- export const ARDUINO_LEONARDO: Pin = {
91
- digital: [['13', '13'], ['12', '12'], ['11', '11'], ['10', '10'], ['9', '9'], ['8', '8'], ['7', '7'], ['6', '6'], ['5', '5'], ['4', '4'], ['3', '3'], ['2', '2']],
92
- analog: [['A0', 'A0'], ['A1', 'A1'], ['A2', 'A2'], ['A3', 'A3'], ['A4', 'A4'], ['A5', 'A5']],
93
- pwm: [['~3', '3'], ['~5', '5'], ['~6', '6'], ['~9', '9'], ['~10', '10'], ['~11', '11'], ['~13', '13']],
94
- i2c: [['IIC', '3,2']],
95
- }
96
-
97
- export const MICROBIT: Pin = {
98
- digital: [['P0', 'P0'], ['P1', 'P1'], ['P2', 'P2'], ['P3', 'P3'], ['P4', 'P4'], ['P5', 'P5'], ['P6', 'P6'], ['P7', 'P7'], ['P8', 'P8'], ['P9', 'P9'], ['P10', 'P10'], ['P11', 'P11'], ['P12', 'P12'], ['P13', 'P13'], ['P14', 'P14'], ['P15', 'P15'], ['P16', 'P16'], ['P19', 'P19'], ['P20', 'P20']],
99
- i2c: [['IIC', 'P19,P20']],
100
- }
101
-
102
- export const MICROBIT2: Pin = {
103
- digital: [['0', 'P0'], ['1', 'P2'], ['2', 'P11'], ['3', 'P10']],
104
- analog: [['0', 'P0'], ['1', 'P2'], ['3', 'P10']],
105
- i2c: [['IIC', 'P19,P20']],
106
- ultrasonic: [['0', 'P2,P1']],
107
- motorDC: [['1', 'P2,P1']],
108
- motorPwm: [['MD', 'P13,P14'], ['MI', 'P15,P16']],
109
- }
110
-
111
- export const MICROBIT3: Pin = {
112
- digital: [['0', 'P0'], ['1', 'P2'], ['2', 'P11'], ['3', 'P5']],
113
- analog: [['0', 'P0'], ['1', 'P2']],
114
- digital1: [['1', 'P2']],
115
- analog1: [['0', 'P0'], ['2', 'P11'], ['3', 'P5']],
116
- i2c: [['IIC', 'P19,P20'], ['IIC 2', 'P19.2,P20.2']],
117
- ultrasonic: [['1', 'P2,P1']],
118
- motorDC: [['1', 'P2,P1']],
119
- motorPwm: [['RM', 'P13,P14'], ['LM', 'P15,P16']],
120
- }
121
-
122
- export const CREABOTS: Pin = {
123
- digital: [['0', 'A0'], ['1', 'A3'], ['2', '3']],
124
- digitalServo: [['0', 'A0'], ['1', 'A3'], ['2', '3']],
125
- analog: [['0', 'A0'], ['1', 'A3']],
126
- pwm: [['2', '3']],
127
- motorPwm: [['MD', '4,5'], ['MI', '7,6']],
128
- i2c: [['IIC', 'A4,A5']],
129
- ultrasonic: [['0', 'A0,A1'], ['1', 'A3,A2']],
130
- joystick: [['0', 'A0,A1,A7']]
131
- }
package/tsconfig.json DELETED
@@ -1,13 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "es2016",
4
- "module": "commonjs",
5
- "esModuleInterop": true,
6
- "noImplicitAny": false,
7
- "forceConsistentCasingInFileNames": true,
8
- "strict": true,
9
- "skipLibCheck": true,
10
- "outDir": "dist",
11
- "sourceMap": true
12
- }
13
- }