aj0070/lora-node

Battery-powered ESP32-S3 LoRa environmental sensor board with USB-C charging, 3.3 V regulation, BME280 I²C sensing, SX1262 LoRa radio and U.FL antenna connector.

Version
1.0.0
License
unset
Stars
0

Use with the tscircuit CLI

tsci is the tscircuit CLI. Install it with npm install -g tscircuit.

tsci clone aj0070/lora-node  # download the package files into ./lora-node
tsci add aj0070/lora-node    # add it to your project as @tsci/aj0070.lora-node

In a cloned or new (tsci init) project: tsci dev starts a local preview, tsci build outputs Circuit JSON, and tsci push publishes to tscircuit.com.

imports/BME280.tsx

import type { ChipProps } from "tscircuit"

export const bme280PinLabels = {
  pin1: "GND1",
  pin2: "CSB",
  pin3: "SDI",
  pin4: "SCK",
  pin5: "SDO",
  pin6: "VDDIO",
  pin7: "GND2",
  pin8: "VDD",
} as const

const bmePads = [
  { n: 1, x: 1.25857, y: 0.975106 },
  { n: 2, x: 1.25857, y: 0.32512 },
  { n: 3, x: 1.25857, y: -0.324866 },
  { n: 4, x: 1.25857, y: -0.975106 },
  { n: 5, x: -1.25857, y: -0.975106 },
  { n: 6, x: -1.25857, y: -0.324866 },
  { n: 7, x: -1.25857, y: 0.32512 },
  { n: 8, x: -1.25857, y: 0.975106 },
]

export const BME280 = (props: ChipProps<typeof bme280PinLabels>) => (
  <chip
    pinLabels={bme280PinLabels}
    manufacturerPartNumber="BME280"
    supplierPartNumbers={{ jlcpcb: ["C92489"] }}
    footprint={
      <footprint>
        {bmePads.map((p) => (
          <smtpad
            key={p.n}
            portHints={[`pin${p.n}`]}
            pcbX={`${p.x}mm`}
            pcbY={`${p.y}mm`}
            width="0.36mm"
            height="0.5mm"
            shape="rect"
          />
        ))}
        <courtyardrect width="3mm" height="3mm" />
      </footprint>
    }
    {...props}
  />
)