Skip to content

Commit 328a44d

Browse files
authored
feat(hx711): add hx711 load cell amp
* Adds HX711 Issue wokwi#101 * Changes from PR comments * Fixes more `Hx711Element` case to `HX711Element` * Adds Load sensors and Gauge Pressure sensors to board HX711 board * Updates HX711 so it resizes when different sensors are active * HX711 Element, removes unused code and makes width and height not user selectable. * HX711 Element changes text to not be selectable. * HX711 Element, Removes more unused code * HX711 Element, changed default type to 50kg * HX711 Element changes width/height to number * HX711 Element, extracts sensor type to function with default. Co-authored-by: Chris Wilson <>
1 parent c40b1d7 commit 328a44d

File tree

4 files changed

+445
-0
lines changed

4 files changed

+445
-0
lines changed

src/hx711-element.stories.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { html } from 'lit';
2+
import './hx711-element';
3+
4+
export default {
5+
title: 'HX711',
6+
component: 'wokwi-hx711',
7+
};
8+
9+
const Template = ({ width, height, type = '50kg' }) =>
10+
html`<wokwi-hx711 .type=${type} .width=${width} .height=${height}></wokwi-hx711>`;
11+
12+
export const loadCell50kg = Template.bind({});
13+
loadCell50kg.args = { type: '50kg', width: 580, height: 430 };
14+
15+
export const loadCell5kg = Template.bind({});
16+
loadCell5kg.args = { type: '5kg', width: 507, height: 269 };
17+
18+
export const gaugePressure = Template.bind({});
19+
gaugePressure.args = { type: 'gauge', width: 509, height: 200 };

0 commit comments

Comments
 (0)