Skip to content

Commit

Permalink
add ino program for display 1.28 round screen
Browse files Browse the repository at this point in the history
  • Loading branch information
k-okada committed Nov 7, 2022
1 parent 9479e67 commit 707de9c
Show file tree
Hide file tree
Showing 4 changed files with 575 additions and 0 deletions.
19 changes: 19 additions & 0 deletions jsk_spot_robot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,22 @@ roscd jsk_spot_startup/apps/head_lead_demo

#### Install apps
If you would like to call your apps from rwt_app_chooser, you can

## Setup Developmenet Environment for 1.28 round LCD monitor

- Setup Arduino IDE
- Add followingn Board Manager URLs (File -> Preference -> Additional Boards Manager URLs -> Click icon)
- `https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json`
- Install `esp32` by Espressif Systems 2.0.5 (Tools -> Board -> Boards Manager)
- Install following libraries (Tools -> Manage Libraries)
- `ArduinoSTL` by Mike Matera 1.3.3
- `GFX Library for Arduino` by Moon On Our Nation 1.3.0

- Layout
- Use https://dronebotworkshop.com/gc9a01/#ESP32_Hookup information, but you need to check actual pinout from https://learn.adafruit.com/adafruit-huzzah32-esp32-feather/pinouts

- Upload image file
- Put your image data under `data/` directory.
- Download `arduino-esp32fs-plugin` from `https://github.com/lorol/arduino-esp32fs-plugin/releases`
- Put `esp32fs.jar` into tool direcotry (Arduino/tools/ESP32FS/tool/esp32fs.jar).
- Noete that upload plugin does not work ArduinoIDE >2.0, You need to use ArduinoIDE 1.x
251 changes: 251 additions & 0 deletions jsk_spot_robot/jsk_spot_startup/ino/lcd_128/FreeSansBold10pt7b.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,251 @@
#ifndef FreeSansBold10pt7b_H
#define FreeSansBold10pt7b_H

#ifdef __AVR__
#include <avr/io.h>
#include <avr/pgmspace.h>
#elif defined(ESP8266)
#include <pgmspace.h>
#undef PROGMEM
#define PROGMEM STORE_ATTR
#elif defined(__IMXRT1052__) || defined(__IMXRT1062__)
// PROGMEM is defefind for T4 to place data in specific memory section
#undef PROGMEM
#define PROGMEM
#else
#define PROGMEM
#endif

const uint8_t FreeSansBold10pt7bBitmaps[] PROGMEM = {
0x00, 0xFF, 0xFF, 0xFE, 0x48, 0x7F, 0xC0, 0xE7, 0xE7, 0xE7, 0xE7, 0x42,
0x0C, 0xC3, 0x39, 0xFF, 0xBF, 0xF7, 0xFE, 0x73, 0x0C, 0xE7, 0xFE, 0xFF,
0xDF, 0xF9, 0x8C, 0x33, 0x06, 0x60, 0x08, 0x0F, 0x87, 0xFB, 0xFE, 0xEB,
0xFA, 0x7F, 0x81, 0xF8, 0x1F, 0x82, 0xFE, 0x9F, 0xAF, 0xFF, 0xDF, 0xE3,
0xE0, 0x20, 0x3C, 0x08, 0x3F, 0x0C, 0x3F, 0xC4, 0x18, 0x66, 0x0F, 0xF2,
0x03, 0xF3, 0x00, 0xF3, 0x00, 0x01, 0x1C, 0x01, 0x9F, 0x00, 0x9F, 0xC0,
0xCC, 0x60, 0x47, 0xF0, 0x61, 0xF0, 0x60, 0x70, 0x0F, 0x00, 0xFC, 0x0F,
0xF0, 0x73, 0x83, 0x9C, 0x0F, 0xC0, 0x78, 0x0F, 0xF6, 0xE3, 0xF7, 0x0F,
0x3C, 0x79, 0xFF, 0xE7, 0xFB, 0x0F, 0x9C, 0xFF, 0xF4, 0x1C, 0x63, 0x8C,
0x71, 0x8E, 0x38, 0xE3, 0x8E, 0x38, 0xE1, 0xC7, 0x0C, 0x38, 0x60, 0xC0,
0xE1, 0x87, 0x0C, 0x38, 0x61, 0xC7, 0x1C, 0x71, 0xC7, 0x1C, 0xE3, 0x8C,
0x71, 0x8C, 0x00, 0x10, 0x23, 0xF8, 0x82, 0x85, 0x00, 0x1C, 0x0E, 0x07,
0x1F, 0xFF, 0xFF, 0xFC, 0x70, 0x38, 0x1C, 0x00, 0xFF, 0x93, 0x80, 0xFF,
0xFE, 0xFF, 0x80, 0x08, 0xC4, 0x23, 0x18, 0x84, 0x63, 0x10, 0x8C, 0x40,
0x1E, 0x1F, 0xE7, 0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, 0x38, 0xF0, 0x71, 0xC0, 0x71, 0xCF, 0x78,
0xEE, 0x0F, 0x81, 0xF0, 0x1C, 0x07, 0xC0, 0xF8, 0x3B, 0x8E, 0x39, 0xC7,
0x00, 0xE0, 0xEE, 0x39, 0xC7, 0x18, 0xC3, 0xB8, 0x77, 0x06, 0xC0, 0xF8,
0x0F, 0x01, 0xC0, 0x38, 0x06, 0x03, 0xC0, 0x78, 0x0E, 0x00, 0xFF, 0x7F,
0xBF, 0xC1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE0, 0xFF, 0xFF, 0xFF, 0xE0, 0x19,
0xCE, 0x63, 0x18, 0xC6, 0x37, 0xBC, 0x63, 0x18, 0xC6, 0x39, 0xC6, 0xFF,
0xFF, 0xE0, 0xC7, 0x38, 0xC6, 0x31, 0x8C, 0x63, 0xDE, 0xC6, 0x31, 0x8C,
0xE7, 0x30, 0x70, 0x7C, 0x63, 0xE0, 0xE0 };

const GFXglyph FreeSansBold10pt7bGlyphs[] PROGMEM = {
{ 0, 1, 1, 6, 0, 0 }, // 0x20 ' '
{ 1, 3, 14, 7, 2, -13 }, // 0x21 '!'
{ 7, 8, 5, 9, 1, -14 }, // 0x22 '"'
{ 12, 11, 13, 11, 0, -12 }, // 0x23 '#'
{ 30, 10, 16, 11, 1, -14 }, // 0x24 '$'
{ 50, 17, 14, 18, 0, -13 }, // 0x25 '%'
{ 80, 13, 14, 14, 1, -13 }, // 0x26 '&'
{ 103, 3, 5, 5, 1, -14 }, // 0x27 '''
{ 105, 6, 19, 7, 1, -14 }, // 0x28 '('
{ 120, 6, 19, 7, 0, -14 }, // 0x29 ')'
{ 135, 7, 6, 8, 0, -14 }, // 0x2A '*'
{ 141, 9, 9, 12, 2, -8 }, // 0x2B '+'
{ 152, 3, 6, 5, 1, -2 }, // 0x2C ','
{ 155, 5, 3, 7, 1, -6 }, // 0x2D '-'
{ 157, 3, 3, 5, 1, -2 }, // 0x2E '.'
{ 159, 5, 14, 6, 0, -13 }, // 0x2F '/'
{ 168, 10, 14, 11, 1, -13 }, // 0x30 '0'
{ 186, 6, 14, 11, 2, -13 }, // 0x31 '1'
{ 197, 9, 14, 11, 1, -13 }, // 0x32 '2'
{ 213, 9, 14, 11, 1, -13 }, // 0x33 '3'
{ 229, 9, 14, 11, 1, -13 }, // 0x34 '4'
{ 245, 10, 14, 11, 1, -13 }, // 0x35 '5'
{ 263, 10, 14, 11, 1, -13 }, // 0x36 '6'
{ 281, 9, 14, 11, 1, -13 }, // 0x37 '7'
{ 297, 11, 14, 11, 0, -13 }, // 0x38 '8'
{ 317, 9, 14, 11, 1, -13 }, // 0x39 '9'
{ 333, 3, 10, 5, 1, -9 }, // 0x3A ':'
{ 337, 3, 13, 5, 1, -9 }, // 0x3B ';'
{ 342, 10, 10, 12, 1, -9 }, // 0x3C '<'
{ 355, 10, 8, 12, 1, -8 }, // 0x3D '='
{ 365, 10, 10, 12, 1, -9 }, // 0x3E '>'
{ 378, 10, 15, 12, 1, -14 }, // 0x3F '?'
{ 397, 18, 18, 20, 1, -14 }, // 0x40 '@'
{ 438, 14, 15, 14, 0, -14 }, // 0x41 'A'
{ 465, 11, 15, 14, 2, -14 }, // 0x42 'B'
{ 486, 13, 15, 14, 1, -14 }, // 0x43 'C'
{ 511, 12, 15, 14, 2, -14 }, // 0x44 'D'
{ 534, 10, 15, 13, 2, -14 }, // 0x45 'E'
{ 553, 10, 15, 13, 2, -14 }, // 0x46 'F'
{ 572, 13, 15, 15, 1, -14 }, // 0x47 'G'
{ 597, 11, 15, 15, 2, -14 }, // 0x48 'H'
{ 618, 3, 15, 6, 2, -14 }, // 0x49 'I'
{ 624, 9, 15, 11, 1, -14 }, // 0x4A 'J'
{ 641, 13, 15, 15, 2, -14 }, // 0x4B 'K'
{ 666, 9, 15, 12, 2, -14 }, // 0x4C 'L'
{ 683, 14, 15, 17, 2, -14 }, // 0x4D 'M'
{ 710, 11, 15, 15, 2, -14 }, // 0x4E 'N'
{ 731, 14, 15, 16, 1, -14 }, // 0x4F 'O'
{ 758, 11, 15, 14, 2, -14 }, // 0x50 'P'
{ 779, 14, 15, 16, 1, -14 }, // 0x51 'Q'
{ 806, 12, 15, 14, 2, -14 }, // 0x52 'R'
{ 829, 12, 15, 14, 1, -14 }, // 0x53 'S'
{ 852, 11, 15, 13, 1, -14 }, // 0x54 'T'
{ 873, 11, 15, 15, 2, -14 }, // 0x55 'U'
{ 894, 13, 15, 13, 0, -14 }, // 0x56 'V'
{ 919, 19, 15, 19, 0, -14 }, // 0x57 'W'
{ 955, 13, 15, 13, 0, -14 }, // 0x58 'X'
{ 980, 13, 15, 13, 0, -14 }, // 0x59 'Y'
{ 1005, 11, 15, 12, 1, -14 }, // 0x5A 'Z'
{ 1026, 5, 19, 7, 1, -14 }, // 0x5B '['
{ 1038, 6, 14, 6, 0, -13 }, // 0x5C '\'
{ 1049, 5, 19, 7, 0, -14 }, // 0x5D ']'
{ 1061, 9, 9, 12, 1, -13 }, // 0x5E '^'
{ 1072, 12, 2, 11, 0, 3 }, // 0x5F '_'
{ 1075, 4, 3, 5, 0, -14 }, // 0x60 '`'
{ 1077, 10, 11, 11, 1, -10 }, // 0x61 'a'
{ 1091, 11, 15, 12, 1, -14 }, // 0x62 'b'
{ 1112, 10, 11, 11, 1, -10 }, // 0x63 'c'
{ 1126, 10, 15, 12, 1, -14 }, // 0x64 'd'
{ 1145, 10, 11, 12, 1, -10 }, // 0x65 'e'
{ 1159, 6, 15, 7, 1, -14 }, // 0x66 'f'
{ 1171, 10, 15, 12, 1, -10 }, // 0x67 'g'
{ 1190, 10, 15, 12, 1, -14 }, // 0x68 'h'
{ 1209, 3, 15, 6, 1, -14 }, // 0x69 'i'
{ 1215, 4, 19, 6, 0, -14 }, // 0x6A 'j'
{ 1225, 10, 15, 11, 1, -14 }, // 0x6B 'k'
{ 1244, 3, 15, 5, 1, -14 }, // 0x6C 'l'
{ 1250, 16, 11, 18, 1, -10 }, // 0x6D 'm'
{ 1272, 10, 11, 12, 1, -10 }, // 0x6E 'n'
{ 1286, 11, 11, 12, 1, -10 }, // 0x6F 'o'
{ 1302, 11, 15, 12, 1, -10 }, // 0x70 'p'
{ 1323, 10, 15, 12, 1, -10 }, // 0x71 'q'
{ 1342, 6, 11, 8, 1, -10 }, // 0x72 'r'
{ 1351, 10, 11, 11, 1, -10 }, // 0x73 's'
{ 1365, 5, 13, 7, 1, -12 }, // 0x74 't'
{ 1374, 10, 11, 12, 1, -10 }, // 0x75 'u'
{ 1388, 11, 11, 11, 0, -10 }, // 0x76 'v'
{ 1404, 15, 11, 16, 0, -10 }, // 0x77 'w'
{ 1425, 11, 11, 11, 0, -10 }, // 0x78 'x'
{ 1441, 11, 15, 11, 0, -10 }, // 0x79 'y'
{ 1462, 9, 11, 10, 1, -10 }, // 0x7A 'z'
{ 1475, 5, 19, 8, 0, -14 }, // 0x7B '{'
{ 1487, 1, 19, 6, 2, -14 }, // 0x7C '|'
{ 1490, 5, 19, 8, 2, -14 }, // 0x7D '}'
{ 1502, 9, 4, 10, 0, -6 } }; // 0x7E '~'

const GFXfont FreeSansBold10pt7b PROGMEM = {
(uint8_t *)FreeSansBold10pt7bBitmaps,
(GFXglyph *)FreeSansBold10pt7bGlyphs,
0x20, 0x7E, 24 };

// Approx. 2179 bytes

#endif // FreeSansBold10pt7b_H
38 changes: 38 additions & 0 deletions jsk_spot_robot/jsk_spot_startup/ino/lcd_128/example.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/usr/bin/env python

import rospy
import cv2
import numpy as np
import sys
from sensor_msgs.msg import CompressedImage


rospy.init_node('pub_compressed_image_example')
image = cv2.imread(sys.argv[1] if len(sys.argv) > 1 else '/usr/share/pixmaps/faces/legacy/penguin.jpg')
image = cv2.cvtColor(image,cv2.COLOR_RGB2GRAY) # Comment out if you want to send color data
pub = rospy.Publisher('image/compressed', CompressedImage)
msg = CompressedImage()
msg.header.stamp = rospy.Time.now()
msg.format = 'jpeg'
msg.data = np.array(cv2.imencode('.jpg', image)[1]).tostring()
rospy.loginfo("Sending {}-byte data".format(len(msg.data)))

cv2.imshow('image', image)
rospy.loginfo('C-c or hit any key on images to stop publishing')

# test because wd can no send imagecompress??
from os import listdir
from os.path import isfile, join
images = [ join('/', f) for f in listdir('data') if isfile(join('data', f)) ]
images_i = 0;
msg.data = []
rate = rospy.Rate(10)
while (not rospy.is_shutdown()) and cv2.waitKey(1) < 0:
msg.format = images[images_i%len(images)]
images_i+=1
pub.publish(msg)
rate.sleep()




Loading

0 comments on commit 707de9c

Please sign in to comment.