Skip to main content

python3 library for Ohms law.

Project description

ohmslaw

PyPI - Downloads PyPI - License Documentation Status GitHub Tag

Ohms law is an important and fundamental rule to remember when working with resistors and electronics in general. It defines the relationship between the components’ current I in amps (A), voltage V in volts (V) and resistance R in ohms (Ω). Ohm’s law consists of three mathematical equations that explain the relationship between current, voltage and resistance. If you know two of these values.

Quickstart:

install

pip install ohmslaw

import

from ohmslaw import Ohms

current multiplied by resistance = voltage

o = Ohms()
results = o.volts(I=2, R=4)

print(results)

voltage Divided by resistance = current

o = Ohms()
results = o.current(V=12, R=4)

print(results)

voltage divided by current = resistance

o = Ohms()
results = o.resistance(V=48, I=4)

print(results)

find the resistance value to limit the electrical voltage of a circuit

o = Ohms()
results = o.find_resistor(source=48, component_voltage=12)# Led

print(results)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ohmslaw-1.0rc10.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

ohmslaw-1.0rc10-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file ohmslaw-1.0rc10.tar.gz.

File metadata

  • Download URL: ohmslaw-1.0rc10.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.6

File hashes

Hashes for ohmslaw-1.0rc10.tar.gz
Algorithm Hash digest
SHA256 b5e6d8c11bf2c389c150d9b7354ec983b5486e0810b75d6112ef6f85fda1dd44
MD5 430c9868ec6aec558efe6dd757d04e4a
BLAKE2b-256 ae8d68de62c82d9ed1f537f827f3e87d6daa75b138280ffe8e32527f8f307238

See more details on using hashes here.

File details

Details for the file ohmslaw-1.0rc10-py3-none-any.whl.

File metadata

  • Download URL: ohmslaw-1.0rc10-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.6

File hashes

Hashes for ohmslaw-1.0rc10-py3-none-any.whl
Algorithm Hash digest
SHA256 dbf2482f46275a268adeb973178d8801a6bc2e02c2501a2d1ed4a36f8934ede1
MD5 82d9a255404bc07d455125fe897f5511
BLAKE2b-256 f52c02e5bf487e039554aae054c7b9b46e04ec11369af0df86c0a8310f2656e9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page