-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
209 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,81 @@ | ||
# Pymewc | ||
# Pymewc ( Python Microcontroller Interface) | ||
## _Making your microcontroller connect with python_ | ||
|
||
_version:0.0.6_ | ||
|
||
[![Build Status](https://travis-ci.org/joemccann/dillinger.svg?branch=master)](https://travis-ci.org/joemccann/dillinger) | ||
[![PyPI - License](https://img.shields.io/pypi/l/length)](https://raw.githubusercontent.com/Ratheshprabakar/length/master/LICENSE.md) | ||
![PyPI](https://img.shields.io/pypi/v/pymewc) | ||
[![Contributions](https://img.shields.io/badge/contributions-welcome-green.svg)](https://img.shields.io/badge/contributions-welcome-green.svg) | ||
|
||
- Pymewc is a new and innovative python library that can we used for connecting python with the microcontroller world. | ||
- Pymewc is a lightweight package that aims simplicity yet performing complex tasks with ease. | ||
|
||
## Features | ||
|
||
- Read data from each pin of the microcontroller | ||
- Read data printed on the serial monitor window | ||
- Writing program to the microcontroller(Development Stage) | ||
- Sending data to the local cloud service / running a apache server(Development Stage) | ||
|
||
## Installation | ||
|
||
Pymewc requires [Python](https://www.python.org/) v3.6+ to run. But extensively tested and recomends using python version > 3.8 | ||
|
||
Install the dependencies and packages and thats it. | ||
|
||
#### For windows | ||
``` | ||
pip install pymewc | ||
``` | ||
#### For linux and unix based Operating systems | ||
|
||
. | ||
***Downloading pip on linux based operating systems*** | ||
|
||
Debian and Debian Based distros(Ubuntu, Mint etc) | ||
``` | ||
sudo apt install python3-pip | ||
``` | ||
For Arch and Arch Based distros(Manjaro, Endevour etc) | ||
``` | ||
sudo pacman -S python-pip | ||
``` | ||
|
||
Installing package using pip | ||
``` | ||
pip3 install pymewc | ||
``` | ||
|
||
## How to use the package | ||
|
||
To check whether the python package is working and responding perfectly | ||
|
||
```sh | ||
import pymewc | ||
pymewc.hello() | ||
``` | ||
|
||
For printing what the serial monitor prints: | ||
|
||
```sh | ||
import pymewc | ||
pymewc.serial() # It asks for 2 parameters | ||
# 1- The com-port('com4' or /dev/ttyACMO) depending on the os windows and *ux respectively | ||
# 2- The baud rate | ||
``` | ||
|
||
**Adding few other features which are digitalRead and digitalWrite functionalites(In development will be live soon)** | ||
|
||
|
||
## Development | ||
|
||
Want to contribute? Great! | ||
|
||
I will always welcome everyone contributers to contribute to the project which will be live soon. Hope it hits the market hard | ||
|
||
## License | ||
|
||
MIT | ||
|
||
**Free Software, Hell Yeah!** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
from os import error | ||
|
||
def serial(): | ||
import time | ||
|
||
print("Thanks for using pymewc to record any issue mail to [email protected]") | ||
time.sleep(1) | ||
print('----------------------------------------------------------------------------------------------------') | ||
time.sleep(1) | ||
print("You can also get in touch with me on github link https://github.com/gr8rithic/") | ||
time.sleep(1) | ||
print('----------------------------------------------------------------------------------------------------') | ||
time.sleep(1) | ||
print('Get connected via LinkedIn https://www.linkedin.com/in/rithic-hariharan-8902b4199/') | ||
time.sleep(1) | ||
print('----------------------------------------------------------------------------------------------------') | ||
time.sleep(1) | ||
print('Visit my postfolio https://gr8rithic.github.io/') | ||
time.sleep(1) | ||
print('----------------------------------------------------------------------------------------------------') | ||
time.sleep(1) | ||
print() | ||
print("Setting up the environment") | ||
time.sleep(3) | ||
|
||
|
||
com_port = input("Enter the com-port(Com4 or /dev/ttyACM0 on Windows and Unix based respectively)") | ||
baud_rate = int(input("Enter the baud rate as specified in the .ino file")) | ||
import serial | ||
try: | ||
ser = serial.Serial(com_port, baud_rate) | ||
except error: | ||
print("Check the usb port is mentioned correctly or usb is connected properly") | ||
|
||
while(1): | ||
try: | ||
|
||
x = (ser.readline().strip()) | ||
print("Check the usb port is mentioned correctly or usb is connected properly") | ||
y = (x.decode('utf-8')) | ||
print(y) | ||
|
||
except UnicodeDecodeError: | ||
continue | ||
|
||
def hello(): | ||
print("Hellow world") | ||
|
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
from os import error | ||
|
||
def serial(): | ||
import time | ||
|
||
print("Thanks for using pymewc to record any issue mail to [email protected]") | ||
time.sleep(1) | ||
print('----------------------------------------------------------------------------------------------------') | ||
time.sleep(1) | ||
print("You can also get in touch with me on github link https://github.com/gr8rithic/") | ||
time.sleep(1) | ||
print('----------------------------------------------------------------------------------------------------') | ||
time.sleep(1) | ||
print('Get connected via LinkedIn https://www.linkedin.com/in/rithic-hariharan-8902b4199/') | ||
time.sleep(1) | ||
print('----------------------------------------------------------------------------------------------------') | ||
time.sleep(1) | ||
print('Visit my postfolio https://gr8rithic.github.io/') | ||
time.sleep(1) | ||
print('----------------------------------------------------------------------------------------------------') | ||
time.sleep(1) | ||
print() | ||
print("Setting up the environment") | ||
time.sleep(3) | ||
|
||
|
||
com_port = input("Enter the com-port(Com4 or /dev/ttyACM0 on Windows and Unix based respectively)") | ||
baud_rate = int(input("Enter the baud rate as specified in the .ino file")) | ||
import serial | ||
try: | ||
ser = serial.Serial(com_port, baud_rate) | ||
except error: | ||
print("Check the usb port is mentioned correctly or usb is connected properly") | ||
|
||
while(1): | ||
try: | ||
|
||
x = (ser.readline().strip()) | ||
print("Check the usb port is mentioned correctly or usb is connected properly") | ||
y = (x.decode('utf-8')) | ||
print(y) | ||
|
||
except UnicodeDecodeError: | ||
continue | ||
|
||
def hello(): | ||
print("Hellow world") | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
from setuptools import setup, find_packages | ||
import codecs | ||
import os | ||
|
||
with open("README.md", "r") as fh: | ||
LONG_DESCRIPTION= fh.read() | ||
|
||
VERSION = '0.0.6' | ||
DESCRIPTION = 'Microcontroller and python interface' | ||
|
||
# Setting up | ||
setup( | ||
name="pymewc", | ||
version=VERSION, | ||
author="Rithic C H", | ||
author_email="[email protected]", | ||
description=DESCRIPTION, | ||
long_description = LONG_DESCRIPTION, | ||
long_description_content_type="text/markdown", | ||
packages=find_packages(), | ||
install_requires=['pyserial', 'pyttsx3', 'setuptools'], | ||
keywords=['python', 'IoT', 'microcontroller', 'Arduino', 'Text-to-speech'], | ||
classifiers=[ | ||
"Development Status :: 2 - Pre-Alpha", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: MIT License", | ||
"Programming Language :: Python :: 3", | ||
"Operating System :: Unix", | ||
"Operating System :: MacOS :: MacOS X", | ||
"Operating System :: Microsoft :: Windows", | ||
] | ||
) |