Original by chriscook8 from esp8266.com I just modified to use ESP8266WebServer library for easy to handle the http request.
This is sample code not yet complete.
- when Wifi connected need to close the softAP.
| root@beaglebone:~# sudo strace -f -o trace_adc.txt python adc.py | |
| Message from syslogd@beaglebone at Jun 26 03:45:41 ... | |
| kernel:[ 950.630547] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM | |
| Message from syslogd@beaglebone at Jun 26 03:45:41 ... | |
| kernel:[ 950.747719] Process python (pid: 1053, stack limit = 0xdae7a218) | |
| Message from syslogd@beaglebone at Jun 26 03:45:41 ... | |
| kernel:[ 950.753752] Stack: (0xdae7bce8 to 0xdae7c000) |
| [ 0.000000] Booting Linux on physical CPU 0x0 | |
| [ 0.000000] Linux version 4.14.49-ti-r54 (root@b2-am57xx-beagle-x15-2gb) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)) #1 SMP PREEMPT Fri Jun 15 22:14:13 UTC 2018 | |
| [ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d | |
| [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache | |
| [ 0.000000] OF: fdt: Machine model: TI AM335x BeagleBone Green Wireless | |
| [ 0.000000] Memory policy: Data cache writeback | |
| [ 0.000000] efi: Getting EFI parameters from FDT: | |
| [ 0.000000] efi: UEFI not found. | |
| [ 0.000000] cma: Reserved 48 MiB at 0x9c800000 | |
| [ 0.000000] On node 0 totalpages: 130560 |
| 1080 execve("/usr/bin/python", ["python", "pwm.py"], [/* 16 vars */]) = 0 | |
| 1080 brk(NULL) = 0xf94000 | |
| 1080 uname({sysname="Linux", nodename="beaglebone", ...}) = 0 | |
| 1080 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) | |
| 1080 mmap2(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f74000 | |
| 1080 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) | |
| 1080 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 | |
| 1080 fstat64(3, {st_mode=S_IFREG|0644, st_size=24325, ...}) = 0 | |
| 1080 mmap2(NULL, 24325, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb6f6e000 | |
| 1080 close(3) = 0 |
| #Docs: http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0 | |
| uname_r=4.14.49-ti-r54 | |
| #uuid= | |
| #dtb= | |
| ###U-Boot Overlays### | |
| ###Documentation: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays | |
| ###Master Enable |
| /** | |
| * ========================================================================== | |
| * main.c | |
| * (c) 2014-2015, Petr Machala | |
| * | |
| * Description: | |
| * OptRec sensor system main file. | |
| * Optimized for 32F429IDISCOVERY board. | |
| * | |
| * License: |
| from TwitterAPI import TwitterAPI | |
| from TwitterAPI import TwitterRestPager | |
| from natsort import versorted | |
| import json, sys, glob, os | |
| def main(args): | |
| if len(args) < 2: | |
| print "usage: python tweets.py #hashtag" | |
| print "" |
| #include <Wire.h> // Use Wire according to arcticle https://garretlabs.wordpress.com/2014/03/18/the-dark-side-of-porting-arduino-sketches-on-intel-galileo-part-one/ | |
| int RESET_PIN = 8; | |
| int DC_PIN = 9; | |
| int CS_PIN = 7; | |
| int MOSI_PIN = 2; | |
| int MISO_PIN = 12; | |
| int SCK_PIN = 3; | |
| //TFT resolution 240*320 |
| #!/usr/bin/python | |
| ''' | |
| Author: Igor Maculan - [email protected] | |
| A Simple mjpg stream http server | |
| ''' | |
| import cv2 | |
| import Image | |
| from BaseHTTPServer import BaseHTTPRequestHandler,HTTPServer | |
| import StringIO | |
| import time |