H59BQ

    Роботы, суперкомпьютеры, искуcственный интеллект, хакеры,
    Старое надоело, и захотелось вытеснения старого новым.
    Однако'ж неожиданно сработала схема дополнения.
    Достаточно глянуть на шкалу цен и их динамику.
    (сколько стоит квартира и сколько китайская электроника)

I. AVR GCC
==========

Install

  # apt-get install gcc-avr binutils-avr avr-libc gdb-avr avrdude

  virtu@GBOX:~$ mkdir AVRC
  virtu@GBOX:~$ cd AVRC/
  virtu@GBOX:~/AVRC$ cat t.c
  #ifndef F_CPU
  #define F_CPU 16000000UL
  #endif

Test

  #include <avr/io.h>
  #include <util/delay.h>

  int main(void) {
      DDRC = 0x01;
      while ( 1) {
          PORTC = 1;
          _delay_ms(500);
          PORTC = 0;
          _delay_ms(500);
      }
  }

  virtu@GBOX:~/AVRC$ mv t t.c
  virtu@GBOX:~/AVRC$ avr-gcc -g -Os -mmcu=atmega88 -c t.c
  virtu@GBOX:~/AVRC$ avr-gcc -g -mmcu=atmega88 -o t.elf t.o
  virtu@GBOX:~/AVRC$ avr-objcopy -j .text -j .data -O ihex t.elf t.hex

  virtu@GBOX:~/AVRC$ cat t.hex
  :1000000019C020C01FC01EC01DC01CC01BC01AC00C
  :1000100019C018C017C016C015C014C013C012C034
  :1000200011C010C00FC00EC00DC00CC00BC00AC064
  :1000300009C008C011241FBECFEFD4E0DEBFCDBF82
  :1000400002D018C0DDCF81E087B988B92FEF39E63B
  :1000500098E1215030409040E1F700C0000018B80E
  :100060002FEF39E698E1215030409040E1F700C091
  :080070000000EBCFF894FFCF74
  :00000001FF

Burn:

  avrdude -p m88p -P /dev/ttyACM1 -c avrispv2 -U flash:w:test.hex

make

  program: $(TARGET).hex
      avrdude -p $(MCU) -c avr109 -P $(PORT) -U flash:w:$(TARGET).hex

Test with VMLab
...............

  http://www.amctools.com/cgi-bin/yabb2/YaBB.pl?num=1250250728
  http://www.amctools.com/yabbfiles/Attachments/GraphicsLCD_004.zip

"Drag on Plank" file for VMLab:
...............................

  /usr/share/applications/vmlab.desktop

  [Desktop Entry]
  Encoding=UTF-8
  Version=1.0
  Type=Application
  Name=Vmlab 3.10
  Icon=/home/virtu/wine ~/.wine/drive_c/VMLAB/bin/vmlab.png
  Path=/home/virtu/.wine/drive_c/VMLAB/bin
  Exec=wine VMLAB.EXE
  StartupNotify=false
  StartupWMClass=Wine
  OnlyShowIn=Unity;
  X-BAMFGenerated=true
  Name[en_US]=VMLab


II. Jupyter notebook
====================

Install

  # apt-get update
  # apt-get upgrade
  # apt-get install python3 python3-pip
  # pip3 install jupyter
  # pip3 install pyserial

  $ pip3 install vpython

  $ jupyter notebook

New Python3 notebook

  from __future__ import division, print_function
  from math import *
  from vpython import *
  box()

In your browser, press [  |>|   ] (to run).
                       [ Logout ] (to logout).

Links
-----

1. http://maxembedded.com/2015/06
        /setting-up-avr-gcc-toolchain-on-linux-and-mac-os-x/

2. https://www.pololu.com/docs/0J36/4.b

3. http://jupyter.org/
