Skip to content

Commit 8a5f125

Browse files
committed
feat(servo): add pinInfo
1 parent 805ab8a commit 8a5f125

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/servo-element.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { customElement, html, LitElement, property } from 'lit-element';
2+
import { ElementPin } from './pin';
23

34
@customElement('wokwi-servo')
45
export class ServoElement extends LitElement {
@@ -16,6 +17,12 @@ export class ServoElement extends LitElement {
1617
/** Servo horn color (as an HTML color) */
1718
@property() hornColor = '#ccc';
1819

20+
readonly pinInfo: ElementPin[] = [
21+
{ name: 'GND', x: 0, y: 50, signals: [{ type: 'power', signal: 'GND' }] },
22+
{ name: 'V+', x: 0, y: 59.5, signals: [{ type: 'power', signal: 'VCC' }] },
23+
{ name: 'PWM', x: 0, y: 69, signals: [{ type: 'pwm' }] },
24+
];
25+
1926
hornPath() {
2027
switch (this.horn) {
2128
case 'cross':

0 commit comments

Comments
 (0)