sudo apt-get update
sudo apt-get upgrade
sudo wget http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key
sudo apt-key add mosquitto-repo.gpg.key
sudo rm mosquitto-repo.gpg.key
cd /etc/apt/sources.list.d/
If you have an access as a root to your Ubuntu 16.04 VPS you should setup another user giving him sudo access
adduser pavel # my user is called "pavel"; enter password and leave all the rest
usermod -aG sudo pavel
nano /etc/ssh/sshd_config # disable root access
# find
PermitRootLogin # change value to: no
# add
AllowUsers pavel
- On SD card in Windows locate
config.txt
add new line withdtoverlay=dwc2
- open file
cmdline.txt
and just afterrootwait
addmodules-load=dwc2,g_ether
with space inbetween - insert card to Pi and insert USB cable to USB labeled micro USB
- driver will install itself, if not select
manual install of driver -> From list -> Network device -> Microsoft -> Remote NDIS compatible device
- SSH to Pi with name
raspberrypi.local
(Bonjour must be installed)
so that you don't need to run Bonjour
echo -e "interface usb0 \nstatic ip_address=169.254.71.164" | sudo tee -a /etc/dhcpcd.conf
sudo apt-get install cups
sudo usermod -a -G lpadmin pi
sudo cupsctl --remote-any
sudo /etc/init.d/cups restart
Add printer via web interface http://ipaddresofraspberry:631
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "mbed.h" | |
#if DEVICE_SERIAL_ASYNCH | |
Serial pc(USBTX, USBRX); | |
#else | |
#error "Platform not compatible with Serial async" | |
#endif | |
#define BUFF_LENGTH 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "mbed.h" | |
const uint32_t baud = 9600; | |
uint8_t eQueue_buffer[3 * EVENTS_EVENT_SIZE]; | |
EventQueue eQueue(3 * EVENTS_EVENT_SIZE, eQueue_buffer); | |
LowPowerTimeout rs232Timeout; | |
Serial rs232(TX_pin, RX_pin, baud); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <mbed.h> | |
RawCAN can(CAN_RXD_pin, CAN_TXD_pin); | |
DigitalOut can_sleep(CAN_STANDBY_pin, 0); | |
int main() { | |
can.frequency(250000); | |
can.mode(CAN::Normal); | |
uint8_t tderr_prev = 0; | |
bool bus_state = true; |