Category Archives: Uncategorized
MIDI request current path data from Korg Minilogue
Send following bytes (manual “CURRENT PROGRAM DATA DUMP REQUEST”):
0xF0,0x42,0x30,0x00,0x01,0x2C,0x10,0xF7
Minilogue will respond with “PROGRAM DATA DUMP REQUEST (1 PROG)” which will contain data specified in “TABLE 2 : PROGRAM PARAMETER”.
Tampere TKL bus delays 28-29.8.2017 (24h sample)
iLap Transponder info
Has 7.372MHz crystal (*16 = 460.750kHz)
UART at 38400
850nm IR
38.4kHz * 12 = 460.8kHz
Code transmitted in 1.5ms, repeated every 5ms (200Hz)
Possible receiver: TSOP7000
Rant: my Apple fanboyism is starting to crack
Really, really annoying things with Apple products, every day:
– My iPhone 6S has battery malfunction (shuts down at 40% of battery level and refuses to start) and is under warranty change. However the repair shops cannot get the batteries because of high demand. Apple calls this issue affecting small amount of iPhones. I doubt it.
– Using “night mode” which mutes the iPhone automatically during night. However when plugging the charging cable makes “pling” noise when everything else is muted. Really nice because when rest of family is sleeping and you want to charge overnight.
– Forget to put the phone on charging. Wakes me up at morning still, good boy. To shut off the alert I need to enter my 6 digit passcode (because the phone rebooted). Why I need to enter passcode on reboot? Isn’t the fingerprint scanning enough secure?! Trying to tap the passcode without eyeglasses immediately when woken up is like a nasty test.
– Apple releases new Macbook (finally) and I was waiting to replace my old Macbook with brand new. Apple raises prices and removes USB ports and SD card slot on new model. Well played, Apple.
– I purchase previous model Macbook because of previous issue and think 128GB is enough for the “internal” SSD. I was wrong, installed Xcode and constantly running out of disk. Irritating me with nags. The internal SSD cannot be replaced. Need to use external hard disks.
– My iPad wants to make OS upgrade but I don’t want to do it. Asks it every day. With two dialogs. I. DON’T. WANT. TO. UPDATE. PLEASE. LET. ME. CONTINUE. Solution: there isn’t any real solution, but you can hack it.
Next laptop: back to Windows? Really?!
Useful commands
GIT: Show changed files in last commit
git log --name-only --pretty=oneline --full-index HEAD^^..HEAD | grep -vE '^[0-9a-f]{40} ' | sort | uniq
GIT: Show file history
git log -p filename
BASH: Find word in files
grep -R "word_to_search" *
Dshot times & frequencies
One frame (“pulse”) is 16 bits long.
It contains
- 11 bits of throttle value (2047 separate throttle positions available)
- 1 bit telemetry request
- 4 bits of CRC checksum.
The options for Dshot speeds are:
Dshot 600 | 600 kbit per second | Single frame: 26.66 uS (microseconds) | Absolute maximum update frequency 37.5 kHz |
Dshot 300 | 300 kbit per second | Single frame: 53.3 uS (microseconds) | Absolute maximum update frequency 18.75 kHz |
Dshot 150 | 150 kbit per second | Single frame: 106.6 uS (microseconds) | Absolute maximum update frequency 9.3 kHz |
Just a reminder: multishot pulse is max 25 uS long, multishot protocol allowing max 32kHz update speed.
For “old” methods (dshot, oneshot), see this link.
Tip: Serial ports in microcontrollers
– Use software serials ONLY for debugging. Software serials are not reliable.
– Use hardware serials primarily for interfacing with devices (GPS etc.)
– Prepare for debugging port in your design
– Program the uC through native programming method (ISP, ICSP) if you don’t have several hardware USARTs
– Make all sorts of cross-compatible adapters and cables for easy debugging
– Use two laptops for development: one for plainly debugging
When picking uC, make sure you have plenty of hardware serials. Usually one isn’t enough.
Simple Arduino Timing class
class jeTime
{
public:
jeTime()
{
reset();
}
float elapsedInSeconds()
{
return (millis()-theTime)/1000.0;
}
int elapsedInMilliSeconds()
{
return millis()-theTime;
}
void reset()
{
theTime = millis();
}
private:
long theTime;
};
Most important NMEA sentence is GPGGA
GGA – essential fix data which provide 3D location and accuracy data.
$GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47
Where:
GGA Global Positioning System Fix Data
123519 Fix taken at 12:35:19 UTC
4807.038,N Latitude 48 deg 07.038′ N
01131.000,E Longitude 11 deg 31.000′ E
1 Fix quality: 0 = invalid
1 = GPS fix (SPS)
2 = DGPS fix
3 = PPS fix
4 = Real Time Kinematic
5 = Float RTK
6 = estimated (dead reckoning) (2.3 feature)
7 = Manual input mode
8 = Simulation mode
08 Number of satellites being tracked
0.9 Horizontal dilution of position
545.4,M Altitude, Meters, above mean sea level
46.9,M Height of geoid (mean sea level) above WGS84
ellipsoid
(empty field) time in seconds since last DGPS update
(empty field) DGPS station ID number
*47 the checksum data, always begins with *
If the height of geoid is missing then the altitude should be suspect. Some non-standard implementations report altitude with respect to the ellipsoid rather than geoid altitude. Some units do not report negative altitudes at all. This is the only sentence that reports altitude.