You must change directory to the directory where GoCV has been installed, then you can run the code.
chdir %GOPATH%\src\gocv.io\x\gocv
go run cmd\hello\main.go
| // What it does: | |
| // | |
| // This example opens a video capture device, then streams MJPEG from it. | |
| // Once running point your browser to the hostname/port you passed in the | |
| // command line (for example http://localhost:8080) and you should see | |
| // the live video stream. | |
| // | |
| // How to run: | |
| // | |
| // mjpeg-streamer [camera ID] [host:port] |
| // Connects to an MCP3008 ADC via SPI. | |
| package main | |
| import ( | |
| "errors" | |
| "machine" | |
| "time" | |
| ) | |
| var ( |
| // Automatically generated file. DO NOT EDIT. | |
| // Generated by gen-device-svd.py from nrf52.svd, see https://github.com/NordicSemiconductor/nrfx/tree/master/mdk | |
| // +build nrf,nrf52 | |
| // nRF52832 reference description for radio MCU with ARM 32-bit Cortex-M4 Microcontroller | |
| // | |
| // Copyright (c) 2010 - 2018, Nordic Semiconductor ASA All rights reserved. | |
| // | |
| // Redistribution and use in source and binary forms, with or without |
| // Automatically generated file. DO NOT EDIT. | |
| // Generated by gen-device-svd.py from nrf52840.svd, see https://github.com/NordicSemiconductor/nrfx/tree/master/mdk | |
| // +build nrf,nrf52840 | |
| // nRF52840 reference description for radio MCU with ARM 32-bit Cortex-M4 Microcontroller | |
| // | |
| // Copyright (c) 2010 - 2018, Nordic Semiconductor ASA All rights reserved. | |
| // | |
| // Redistribution and use in source and binary forms, with or without |
| package main | |
| import ( | |
| "fmt" | |
| "io/ioutil" | |
| "net/http" | |
| "runtime" | |
| "time" | |
| "gocv.io/x/gocv" |
| package main | |
| import ( | |
| "fmt" | |
| "time" | |
| "gobot.io/x/gobot" | |
| "gobot.io/x/gobot/api" | |
| ) |
| // how to run: | |
| // go run mqtt.go tcp://iot.eclipse.org:1883 /topic/name | |
| package main | |
| import ( | |
| "os" | |
| mqtt "github.com/eclipse/paho.mqtt.golang" | |
| "github.com/gizak/termui" | |
| ) |
| pi@raspberrypi:~ $ ./raspi_ads1015 | |
| 2017/04/26 18:26:02 Initializing connections... | |
| 2017/04/26 18:26:02 Initializing connection RaspberryPi-77EEC3CB ... | |
| 2017/04/26 18:26:02 Initializing devices... | |
| 2017/04/26 18:26:02 Initializing device ADS1x15-6235DFBD ... | |
| 2017/04/26 18:26:02 Robot ads1015bot initialized. | |
| 2017/04/26 18:26:02 Starting Robot ads1015bot ... | |
| 2017/04/26 18:26:02 Starting connections... | |
| 2017/04/26 18:26:02 Starting connection RaspberryPi-77EEC3CB... | |
| 2017/04/26 18:26:02 Starting devices... |
| package main | |
| import "fmt" | |
| type tableServer struct { | |
| table int | |
| } | |
| type TableServer interface { | |
| SetTable(table int) |