diff --git a/README.md b/README.md index 0ddf624..9cf00d7 100644 --- a/README.md +++ b/README.md @@ -1 +1,81 @@ -# Pymewc \ No newline at end of file +# 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!** diff --git a/build/lib/pymewc/__init__.py b/build/lib/pymewc/__init__.py new file mode 100644 index 0000000..cabf138 --- /dev/null +++ b/build/lib/pymewc/__init__.py @@ -0,0 +1,48 @@ +from os import error + +def serial(): + import time + + print("Thanks for using pymewc to record any issue mail to gr8rithic@gmail.com") + 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") + diff --git a/dist/pymewc-0.0.6-py3-none-any.whl b/dist/pymewc-0.0.6-py3-none-any.whl new file mode 100644 index 0000000..a7e4e6a Binary files /dev/null and b/dist/pymewc-0.0.6-py3-none-any.whl differ diff --git a/dist/pymewc-0.0.6.tar.gz b/dist/pymewc-0.0.6.tar.gz new file mode 100644 index 0000000..3ba2e6c Binary files /dev/null and b/dist/pymewc-0.0.6.tar.gz differ diff --git a/pymewc/__init__.py b/pymewc/__init__.py new file mode 100644 index 0000000..cabf138 --- /dev/null +++ b/pymewc/__init__.py @@ -0,0 +1,48 @@ +from os import error + +def serial(): + import time + + print("Thanks for using pymewc to record any issue mail to gr8rithic@gmail.com") + 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") + diff --git a/pymewc/__pycache__/__init__.cpython-38.pyc b/pymewc/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000..b87c1f2 Binary files /dev/null and b/pymewc/__pycache__/__init__.cpython-38.pyc differ diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..84557c7 --- /dev/null +++ b/setup.py @@ -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="gr8rithic@gmail.com", + 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", + ] +)