1 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,995 +0,0 @@ |
1 |
-/* |
|
2 |
- Background Radiation Monitor - Web Server |
|
3 |
- |
|
4 |
- A simple web server that makes available to clients over the Internet |
|
5 |
- readings from a MightyOhm Geiger counter. The MightyOhm is connected to |
|
6 |
- an Arduino Uno with attached Ethernet shield. This software module |
|
7 |
- runs on the Arduino Uno an embedded HTTP server by which Internet |
|
8 |
- applications can query the MightyOhm for Geiger counter readings. |
|
9 |
- Also, this software runs a Network Time Protocol (NTP) client, that |
|
10 |
- periodically synchronizes the local system clock to network time. |
|
11 |
- Included is a simple command line interface that may be used to change the |
|
12 |
- network interface IP address, NTP server address, or configure a |
|
13 |
- verbose output mode. |
|
14 |
- |
|
15 |
- Copyright 2014 Jeff Owrey |
|
16 |
- This program is free software: you can redistribute it and/or modify |
|
17 |
- it under the terms of the GNU General Public License as published by |
|
18 |
- the Free Software Foundation, either version 3 of the License, or |
|
19 |
- (at your option) any later version. |
|
20 |
- |
|
21 |
- This program is distributed in the hope that it will be useful, |
|
22 |
- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
23 |
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
24 |
- GNU General Public License for more details. |
|
25 |
- |
|
26 |
- You should have received a copy of the GNU General Public License |
|
27 |
- along with this program. If not, see http://www.gnu.org/license. |
|
28 |
- |
|
29 |
- Circuit: |
|
30 |
- * Main components: Arduino Uno, Ethernet shield, Mighty Ohm Geiger counter |
|
31 |
- * Ethernet shield attached to pins 10, 11, 12, 13 |
|
32 |
- * In order to allow the MightyOhm to operate on the Uno's 5 volt power |
|
33 |
- supply, and thus make the MightyOhm's serial output compatible with the |
|
34 |
- Uno, the following has to be done (see MightyOhm schematic): |
|
35 |
- 1. Change R6 to 1K Ohm. |
|
36 |
- 2. Change R11 to 330 Ohm. |
|
37 |
- 3. Connect +5v from the Uno to MightyOhm J6 pin 1. |
|
38 |
- 4. Connect GND from the Uno to MightyOhm J6 pin 3. |
|
39 |
- 5. Connect D5 from the Uno to MightyOhm J7 pin 5. |
|
40 |
- |
|
41 |
- Misc Notes: |
|
42 |
- As of this release the Uno's SRAM gets entirely maxed out by |
|
43 |
- this program. Any modifications to this program that requires |
|
44 |
- additional memory seriously entails the risk that the modifications |
|
45 |
- will cause the program to become un-stable. |
|
46 |
- |
|
47 |
- Revision History: |
|
48 |
- * v10 released 25 Feb 2014 by J L Owrey |
|
49 |
- * v11 released 24 Jun 2014 by J L Owrey |
|
50 |
- - optimization of processRxByte function to conserve SRAM |
|
51 |
- - removal of non-used function code |
|
52 |
- - defaults to APIPA IP address in the event a DHCP address |
|
53 |
- cannot be obtained |
|
54 |
- * v12 released 20 Dec 2014 by J L Owrey |
|
55 |
- - removed Timestamp global variable to make more dynamic |
|
56 |
- memory available for local variables |
|
57 |
- - optimized clock network synch algorithm |
|
58 |
- - optimized serial update algorithm |
|
59 |
- * v13 released 22 Jul 2015 by J L Owrey |
|
60 |
- - add use of "F" function to store constant strings in |
|
61 |
- program flash memory in order to save SRAM space |
|
62 |
- * v14 released 19 Aug 2015 by J L Owrey |
|
63 |
- - add ability to respond to web a client request with either |
|
64 |
- a JSON compatible string or a standard HTML document |
|
65 |
-*/ |
|
66 |
- |
|
67 |
-/*** PREPROCESSOR DEFINES ***/ |
|
68 |
- |
|
69 |
-/* |
|
70 |
- Define the header and version number displayed at startup |
|
71 |
- and also by the 'view settings' command. |
|
72 |
-*/ |
|
73 |
-#define STARTUP_HEADER "\n\rRadmon v1.4 (c) 2015" |
|
74 |
-#define RADMON_VERSION "v1.4" |
|
75 |
-/* |
|
76 |
- The following define sets the MAC address of the device. This |
|
77 |
- address is a permanent attribute of the device's Ethernet interface, |
|
78 |
- and never, ever, should be changed. This address was provided |
|
79 |
- by the Arduino Ethernet shield manufacturer for use with this |
|
80 |
- specific instance of the Ethernet shield. This MAC address should |
|
81 |
- be shown on a label affixed to the device housing. |
|
82 |
-*/ |
|
83 |
-#define ETHERNET_MAC_ADDRESS 0x90, 0xA2, 0xDA, 0x0D, 0x84, 0xF6 |
|
84 |
-/* |
|