Skip to content

Commit b59456a

Browse files
author
norlihazmey
committed
initial commit
0 parents  commit b59456a

File tree

771 files changed

+117242
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

771 files changed

+117242
-0
lines changed

.idea/inspectionProfiles/profiles_settings.xml

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/python-arduino-interfacing.iml

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/workspace.xml

+30
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## Introduction
2+
3+
Arduino capture data from sensors(any sensors) and python desktop application will reading the data from serial that eventually plotted the result in a Chart.
4+
5+
6+
## Requirements
7+
- python 2.7
8+
- Tkinter
9+
- Matplotlib
10+
11+
## How to run
12+
Setting up arduino and make it read the sensors(any) and output the data using serial. Run python app:
13+
14+
```
15+
python application.py
16+
```
17+
18+
## Complete(sample) arduino code
19+
*Work in progress*
20+
21+
## Complete pyhton code
22+
23+
*Work in progress*

application.py

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import Tkinter as tk
2+
import matplotlib.pyplot as plt
3+
4+
class Application(tk.Frame):
5+
def __init__(self, master=None):
6+
self.windowSize(master);
7+
tk.Frame.__init__(self, master)
8+
self.grid()
9+
self.createWidget()
10+
11+
""" Set minimum and maximun size of window """
12+
def windowSize(self, master=None):
13+
master.minsize(width=666, height=666)
14+
master.maxsize(width=1200, height=1000)
15+
16+
""" Create widget inside current Frame """
17+
def createWidget(self):
18+
self.quit_botton = tk.Button(self, text='Quit', command=self.quit)
19+
self.quit_botton.grid();
20+
21+
master = tk.Tk()
22+
app = Application(master);
23+
app.master.title('Reading data from Arduino Port')
24+
app.mainloop()

venv/.Python

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/System/Library/Frameworks/Python.framework/Versions/2.7/Python

venv/bin/activate

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# This file must be used with "source bin/activate" *from bash*
2+
# you cannot run it directly
3+
4+
deactivate () {
5+
unset -f pydoc >/dev/null 2>&1
6+
7+
# reset old environment variables
8+
# ! [ -z ${VAR+_} ] returns true if VAR is declared at all
9+
if ! [ -z "${_OLD_VIRTUAL_PATH+_}" ] ; then
10+
PATH="$_OLD_VIRTUAL_PATH"
11+
export PATH
12+
unset _OLD_VIRTUAL_PATH
13+
fi
14+
if ! [ -z "${_OLD_VIRTUAL_PYTHONHOME+_}" ] ; then
15+
PYTHONHOME="$_OLD_VIRTUAL_PYTHONHOME"
16+
export PYTHONHOME
17+
unset _OLD_VIRTUAL_PYTHONHOME
18+
fi
19+
20+
# This should detect bash and zsh, which have a hash command that must
21+
# be called to get it to forget past commands. Without forgetting
22+
# past commands the $PATH changes we made may not be respected
23+
if [ -n "${BASH-}" ] || [ -n "${ZSH_VERSION-}" ] ; then
24+
hash -r 2>/dev/null
25+
fi
26+
27+
if ! [ -z "${_OLD_VIRTUAL_PS1+_}" ] ; then
28+
PS1="$_OLD_VIRTUAL_PS1"
29+
export PS1
30+
unset _OLD_VIRTUAL_PS1
31+
fi
32+
33+
unset VIRTUAL_ENV
34+
if [ ! "${1-}" = "nondestructive" ] ; then
35+
# Self destruct!
36+
unset -f deactivate
37+
fi
38+
}
39+
40+
# unset irrelevant variables
41+
deactivate nondestructive
42+
43+
VIRTUAL_ENV="/Users/norlihazmeynazroltech/projects/python-arduino-interfacing/venv"
44+
export VIRTUAL_ENV
45+
46+
_OLD_VIRTUAL_PATH="$PATH"
47+
PATH="$VIRTUAL_ENV/bin:$PATH"
48+
export PATH
49+
50+
# unset PYTHONHOME if set
51+
if ! [ -z "${PYTHONHOME+_}" ] ; then
52+
_OLD_VIRTUAL_PYTHONHOME="$PYTHONHOME"
53+
unset PYTHONHOME
54+
fi
55+
56+
if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT-}" ] ; then
57+
_OLD_VIRTUAL_PS1="$PS1"
58+
if [ "x" != x ] ; then
59+
PS1="$PS1"
60+
else
61+
PS1="(`basename \"$VIRTUAL_ENV\"`) $PS1"
62+
fi
63+
export PS1
64+
fi
65+
66+
# Make sure to unalias pydoc if it's already there
67+
alias pydoc 2>/dev/null >/dev/null && unalias pydoc
68+
69+
pydoc () {
70+
python -m pydoc "$@"
71+
}
72+
73+
# This should detect bash and zsh, which have a hash command that must
74+
# be called to get it to forget past commands. Without forgetting
75+
# past commands the $PATH changes we made may not be respected
76+
if [ -n "${BASH-}" ] || [ -n "${ZSH_VERSION-}" ] ; then
77+
hash -r 2>/dev/null
78+
fi

venv/bin/activate.csh

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# This file must be used with "source bin/activate.csh" *from csh*.
2+
# You cannot run it directly.
3+
# Created by Davide Di Blasi <davidedb@gmail.com>.
4+
5+
alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; test "\!:*" != "nondestructive" && unalias deactivate && unalias pydoc'
6+
7+
# Unset irrelevant variables.
8+
deactivate nondestructive
9+
10+
setenv VIRTUAL_ENV "/Users/norlihazmeynazroltech/projects/python-arduino-interfacing/venv"
11+
12+
set _OLD_VIRTUAL_PATH="$PATH"
13+
setenv PATH "$VIRTUAL_ENV/bin:$PATH"
14+
15+
16+
17+
if ("" != "") then
18+
set env_name = ""
19+
else
20+
set env_name = `basename "$VIRTUAL_ENV"`
21+
endif
22+
23+
# Could be in a non-interactive environment,
24+
# in which case, $prompt is undefined and we wouldn't
25+
# care about the prompt anyway.
26+
if ( $?prompt ) then
27+
set _OLD_VIRTUAL_PROMPT="$prompt"
28+
set prompt = "[$env_name] $prompt"
29+
endif
30+
31+
unset env_name
32+
33+
alias pydoc python -m pydoc
34+
35+
rehash
36+

venv/bin/activate.fish

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# This file must be used using `. bin/activate.fish` *within a running fish ( http://fishshell.com ) session*.
2+
# Do not run it directly.
3+
4+
function deactivate -d 'Exit virtualenv mode and return to the normal environment.'
5+
# reset old environment variables
6+
if test -n "$_OLD_VIRTUAL_PATH"
7+
set -gx PATH $_OLD_VIRTUAL_PATH
8+
set -e _OLD_VIRTUAL_PATH
9+
end
10+
11+
if test -n "$_OLD_VIRTUAL_PYTHONHOME"
12+
set -gx PYTHONHOME $_OLD_VIRTUAL_PYTHONHOME
13+
set -e _OLD_VIRTUAL_PYTHONHOME
14+
end
15+
16+
if test -n "$_OLD_FISH_PROMPT_OVERRIDE"
17+
# Set an empty local `$fish_function_path` to allow the removal of `fish_prompt` using `functions -e`.
18+
set -l fish_function_path
19+
20+
# Erase virtualenv's `fish_prompt` and restore the original.
21+
functions -e fish_prompt
22+
functions -c _old_fish_prompt fish_prompt
23+
functions -e _old_fish_prompt
24+
set -e _OLD_FISH_PROMPT_OVERRIDE
25+
end
26+
27+
set -e VIRTUAL_ENV
28+
29+
if test "$argv[1]" != 'nondestructive'
30+
# Self-destruct!
31+
functions -e pydoc
32+
functions -e deactivate
33+
end
34+
end
35+
36+
# Unset irrelevant variables.
37+
deactivate nondestructive
38+
39+
set -gx VIRTUAL_ENV "/Users/norlihazmeynazroltech/projects/python-arduino-interfacing/venv"
40+
41+
set -gx _OLD_VIRTUAL_PATH $PATH
42+
set -gx PATH "$VIRTUAL_ENV/bin" $PATH
43+
44+
# Unset `$PYTHONHOME` if set.
45+
if set -q PYTHONHOME
46+
set -gx _OLD_VIRTUAL_PYTHONHOME $PYTHONHOME
47+
set -e PYTHONHOME
48+
end
49+
50+
function pydoc
51+
python -m pydoc $argv
52+
end
53+
54+
if test -z "$VIRTUAL_ENV_DISABLE_PROMPT"
55+
# Copy the current `fish_prompt` function as `_old_fish_prompt`.
56+
functions -c fish_prompt _old_fish_prompt
57+
58+
function fish_prompt
59+
# Save the current $status, for fish_prompts that display it.
60+
set -l old_status $status
61+
62+
# Prompt override provided?
63+
# If not, just prepend the environment name.
64+
if test -n ""
65+
printf '%s%s' "" (set_color normal)
66+
else
67+
printf '%s(%s) ' (set_color normal) (basename "$VIRTUAL_ENV")
68+
end
69+
70+
# Restore the original $status
71+
echo "exit $old_status" | source
72+
_old_fish_prompt
73+
end
74+
75+
set -gx _OLD_FISH_PROMPT_OVERRIDE "$VIRTUAL_ENV"
76+
end

venv/bin/activate_this.py

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
"""By using execfile(this_file, dict(__file__=this_file)) you will
2+
activate this virtualenv environment.
3+
4+
This can be used when you must use an existing Python interpreter, not
5+
the virtualenv bin/python
6+
"""
7+
8+
try:
9+
__file__
10+
except NameError:
11+
raise AssertionError(
12+
"You must run this like execfile('path/to/activate_this.py', dict(__file__='path/to/activate_this.py'))")
13+
import sys
14+
import os
15+
16+
old_os_path = os.environ.get('PATH', '')
17+
os.environ['PATH'] = os.path.dirname(os.path.abspath(__file__)) + os.pathsep + old_os_path
18+
base = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
19+
if sys.platform == 'win32':
20+
site_packages = os.path.join(base, 'Lib', 'site-packages')
21+
else:
22+
site_packages = os.path.join(base, 'lib', 'python%s' % sys.version[:3], 'site-packages')
23+
prev_sys_path = list(sys.path)
24+
import site
25+
site.addsitedir(site_packages)
26+
sys.real_prefix = sys.prefix
27+
sys.prefix = base
28+
# Move the added items to the front of the path:
29+
new_sys_path = []
30+
for item in list(sys.path):
31+
if item not in prev_sys_path:
32+
new_sys_path.append(item)
33+
sys.path.remove(item)
34+
sys.path[:0] = new_sys_path

venv/bin/easy_install

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/Users/norlihazmeynazroltech/projects/python-arduino-interfacing/venv/bin/python
2+
3+
# -*- coding: utf-8 -*-
4+
import re
5+
import sys
6+
7+
from setuptools.command.easy_install import main
8+
9+
if __name__ == '__main__':
10+
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
11+
sys.exit(main())

venv/bin/easy_install-2.7

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/Users/norlihazmeynazroltech/projects/python-arduino-interfacing/venv/bin/python
2+
3+
# -*- coding: utf-8 -*-
4+
import re
5+
import sys
6+
7+
from setuptools.command.easy_install import main
8+
9+
if __name__ == '__main__':
10+
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
11+
sys.exit(main())

venv/bin/pip

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/Users/norlihazmeynazroltech/projects/python-arduino-interfacing/venv/bin/python
2+
3+
# -*- coding: utf-8 -*-
4+
import re
5+
import sys
6+
7+
from pip import main
8+
9+
if __name__ == '__main__':
10+
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
11+
sys.exit(main())

venv/bin/pip2

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/Users/norlihazmeynazroltech/projects/python-arduino-interfacing/venv/bin/python
2+
3+
# -*- coding: utf-8 -*-
4+
import re
5+
import sys
6+
7+
from pip import main
8+
9+
if __name__ == '__main__':
10+
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
11+
sys.exit(main())

0 commit comments

Comments
 (0)