-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDEVEL.txt
112 lines (91 loc) · 4.91 KB
/
DEVEL.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
================================================
Create a github account, and fork the repository
================================================
Go to github.com, create an account, and login.
Search for bananapi-i2c-sensors, and goto the repository.
https://github.com/cdwijs/bananapi-i2c-sensors
Next click "fork" at the top-left, then click fork.
Copy the "HTTPS clone URL" line at the right side
=============================
Getting Qt (Bananapi-lubuntu)
=============================
As root, install qt-sdk:
#apt-get install qt-sdk
=============================
Getting Dia (Bananapi-lubuntu)
=============================
$ sudo apt-get install dia
============================================================
Getting the source and contribute changes (Bananapi-lubuntu)
============================================================
Open a terminal, create a folder somewhere on your system and cd into it. Then type the following:
$ git clone https://github.com/username/bananapi-i2c-sensors.git The repository is now cloned into the folder on your hard disk.
Double click "src.pro" Now Qt creator will start, and load the project.
When you have edited files, choose tools->git->local repository->commit. Activate the checkbox [X] files->check all, type a meaningfull description of the change, and press commit. This information is then stored locally on your computer.
Next, publish the changes you have made to github. Choose tools->git->Remote Repository->Push You will be asked for your github username and password. Now the changes are transferred to your repository on github.
Finally, login to github, navigate to your fork of bananapi-i2c-sensors, and click "Pull request", and then click "Create pull request"
Provide a meaningful summary and description, then click "Create pull request". Now the developers are notified of your changes.
===========================================
Testing the i2c hardware (Bananapi-lubuntu)
===========================================
Issue the following command. This will scan the i2c bus on the expansion header.
$ i2cdetect -y 2
===================================================
Getting the source and contribute changes (Windows)
===================================================
Download and install tortoisegit from here:
https://code.google.com/p/tortoisegit/wiki/Download
create a new folder somewhere on your hard disk.
right click the folder, choose "Git Clone..."
paste the "HTTPS clone URL" line into the line "URL:" it should be something like this:
https://github.com/username/bananapi-i2c-sensors.git
click OK. the repository is now cloned into the folder on your hard disk.
When you have edited files, right click on the folder, choose commit -> master.
You will be asked to enter information why you made the changes. This information is then stored locally on your computer.
Next, publish the changes you have made to github by rightclick, and push. You will be asked for your github username and password. Now the changes are transferred to your repository on github.
Finally, login to github, navigate to your fork of bananapi-i2c-sensors, and click "Pull request", and then click "Create pull request"
Provide a meaningful summary and description, then click "Create pull request". Now the developers are notified of your changes.
====================
Getting Qt (Windows)
====================
http://www.qt.io/download-open-source/
http://download.qt.io/official_releases/online_installers/qt-unified-windows-x86-online.exe
welcome-> next
qt account -> leave all empty, next
setup -> next
installation folder: c:\qt -> next
select components: qt 5.4, deselect all, select minGW 4.9.1 -> next
***and tools-mingw4.9.1
license Agreement: agree -> next
start menu shortcuts -> next
install
installation finished -> next -> launch
============================
Qt git integration (windows)
============================
Install Git for windows, accept all the defaults except "Use Git from Windows Command Prompt"
https://msysgit.github.io/
Next restart the computer to make sure the PATH variable has been updated. Start cmd.exe and type "path <enter>". "c:\Program Files (x86)\Git\cmd" should be present
=====================
Getting Dia (windows)
=====================
Download and install dia from here, accept the default settings
http://dia-installer.de/
=====================
Preparing the bananapi
=====================
add the following line to /etc/group. This will add the group gpio, and make banapi part of the group
gpio:x:123:bananapi
run the following script at startup to set the permissions for the gpio nodes:
#!/bin/bash
echo 17 > /sys/class/gpio/export
echo 18 > /sys/class/gpio/export
echo 27 > /sys/class/gpio/export
echo 22 > /sys/class/gpio/export
echo 23 > /sys/class/gpio/export
chown -R root:gpio /sys/class/gpio
chmod -R 660 /sys/class/gpio
chmod 755 /sys/class/gpio
chown -R root:gpio /sys/devices/platform/gpio-sunxi/gpio/
chmod -R 775 /sys/devices/platform/gpio-sunxi/gpio/
chmod 755 /sys/class/gpio