-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|681|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-




spinal

SpinalWatch

26th August 2023

This is just getting longer and longer, and still not right.
[code]
void print(int x, int y, const char* text) {
int x1 = x;
int fHeight = 0;
int nextSpace = 0;
uint8_t numChars = strlen(text);
const char* wordStart = text; // Pointer to *snip*


spinal

SpinalWatch

19th August 2023

It's weird, I would manually force the buffer and the copy to be different, but then it would only decide that where I'd put the text was different and the background wouldn't be.
I was calling clearSceeenBuffer() in my setup, so I'd expec*snip*


spinal

SpinalWatch

18th August 2023

OK, Started from scratch, First I got the BLE code working and connecting, no problems yet.
Then I added all of the power saving code, one item at a time and still working (power at 1.9mA).
Left it running for a while, no crashing, sent multiple notifica*snip*


spinal

SpinalWatch

15th August 2023

[code]
inline void drawPixel(int x, int y, uint8_t color){
if(x<0 || y<0 || x>=WIDTH || y>=HEIGHT) return;
uint16_t x8 = x>>3;
if(color > 1){
color = GreyPattern[(x&1)+2*(y&1)];
}
if (color){
sBuff[x8 *snip*


spinal

SpinalWatch

12th August 2023

OK, after leaving it running a while, removing an y code that 'does anything' with the received messages, so my function now looks like this...
[code]
void getMessages(){
bleSerial.poll();
while (bleSerial.availableLines() > 0) {
ch*snip*


spinal

SpinalWatch

12th August 2023

Didn't help, this time it crashed after maybe 12 hours?
Added a RAM counter...
[code]
// quick function to find free memory, it's slow though
long unsigned int freeMem = 0;
long unsigned int availableMemory() {
int size = 128*1024; // We ha*snip*


spinal

SpinalWatch

26th July 2023

Turns out it needs a full stop at the end...
[code]
{t:''info'', msg:'Hello World'}.
[/code]
There doesn't seem to be much I'd need to tell the app, but it looks like dismissing notifications or calls will be possible.


spinal

SpinalWatch

26th July 2023

AHA!!
[code]
GadgetBridge said: GB({t:''notify'',id:1690381942,src:''Messages'',title:''Me'',subject:'''',body:''This is a test.'',sender:''''})
GadgetBridge said: GB({t:''notify-'',id:1690381942*snip*


spinal

SpinalWatch

26th July 2023

OK, first attempt to get somewhere...
[code]
BLEBoolCharacteristic myBool(''2A19'', BLERead | BLEWrite | BLENotify);
BLEBooleanCharacteristic myBoolean(''2A19'', BLERead | BLEWrite | BLENotify);
BLECharCharacteristic myChar(''2A19&q*snip*


spinal

Font list

24th July 2023

OK, I tried a little something to verify the font before adding to the list. Simply attempt to load it, apparently if the font system fails to load for whatever reason or returns 0.
However, some fonts seem to not load, but don't return 0, it does say*snip*


spinal

Font list

24th July 2023

I'm doing a font maker to go with my watch project, but having a couple of issues. I'm trying to get a list of all fonts installed on my computer. I do this by reading the registry and creating a text file with a list of fonts. Then I go through th*snip*


spinal

SpinalWatch

16th July 2023

[code]
_____ ____ ____ _ __ __ ______ __ __ __
/ ___/| \\| \\ | | | |__| || | / ]| | |
( \\_ | o ) || | | | | || | / / | | |
\\__ || _/| | || |___ | | | ||_| |_|/ / | |
/ \\ ||*snip*


spinal

SpinalWatch

5th July 2023

The problem I have, is that it's something I've done hundreds of times, but just can't see whats wrong.
[edit] Oh, hang on.....
[code] if(t == menuItem) indent=16; [/code]
Yup, I'm an idiot.


spinal

SpinalWatch

5th July 2023

[code]
int listMax = sizeof (menuText) / sizeof (menuText[0]);
int listStart = menuItem - 2;
if(listStart<0) listStart=0;
int listEnd = listStart+4;
if (listEnd>listMax) {
listEnd=listMax;
listStart=listEnd-4;
if(listSta*snip*


spinal

SpinalWatch

5th July 2023

bloody hell, I've forgot how to do a simple scrolling menu...
My brain can't see whats wrong here :-(
[code]
int listMax = sizeof (menuText) / sizeof (menuText[0]);
int listStart = menuItem - 2;
if(listStart<0) listStart=0;
int lis*snip*


spinal

Machine Made Max

25th May 2023

trying a 'simpler' way. got Poe trying to create a 3d texture with a loaded image on it, then rotate it. So far so good....
Then getting Poe to add a background texture falls flat on its face. Just a white square, seemingly nothing wrong with the *snip*


spinal

Machine Made Max

12th May 2023

Arduino code snippet to read the GY-271 magnetometer and a GY-521 accelerometer values.
[code]
#include <Wire.h>
const int MPU_ADDR = 0x68; // I2C address of MPU-6050
const int MAG_ADDR = 0x0D; // I2C address of QMC5883L
int16_t gyro_x, gyro_y, *snip*


spinal

Mystify...

6th May 2023

As I am making a start on the backgrounds for Max FPS, I'll plonk them in the forum here. The first is a basic 'Mysstify' screenaver type thingy.
[code]
Const SCREENX=800 ; 2 Const for the set Resolution
Const SCREENY=600 *snip*


spinal

Machine Made Max

26th April 2023

I think it's time to ask some real people if they can see what I'm doing wrong or inefficiently...
[code]
def stutter_text(text):
# Split the text into sentences
sentences = re.split(''(?<!\\w\\.\\w.)(?<![A-Z][a-z]\\.)(?<=\\.|\\?*snip*


spinal

Machine Made Max

30th March 2023

Giving javascript a try...
[code]
<!DOCTYPE html>
<html>
<head>
<title>My Page</title>
<script src=&quot (Linkage)
<script src=''code.js''></script>
</head>
<body>
&lt*snip*


spinal

Machine Made Max

21st March 2023

This code *nearly* detects the glitches, but weirdly not always. Thats a puzzle.
[code]
'''
To install more voices (they WILL be needed)
Open Regedit and navigate to Computer\\HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech_OneCore\\
Right clic*snip*


spinal

Machine Made Max

20th March 2023

In theory, yes, in practice....
This is a mess...
[code]
def stutter_text(text):
# Split the text into sentences
sentences = re.split(''(?<!\\w\\.\\w.)(?<![A-Z][a-z]\\.)(?<=\\.|\\?)\\s(?![0-9])'', text)
#print(text)
# put a*snip*


spinal

Machine Made Max

20th March 2023

Currently its this...
[code]
# Draw the mouth
M1 = mouth
if M1 > M: M = M1
# M/13107
frame = int(M/2500)
M=M-32
if M<1024: M=1024
[/code]
[code]
if frame == 0:
bu*snip*


spinal

Machine Made Max

19th March 2023

OK, now that I have speach working quite well, I need to work on the face some more.
So after a few attempts to get chatGPT to draw me some simple concentric circles that are layered and move in parallax according to the mouse x location, with a few &quot*snip*


spinal

Machine Made Max

14th March 2023

I think I've got the speaking much closer to what I'm aiming for...
2023/11/max_test_14_3_23 (.mp3)
[code]
'''
To install more voices (they WILL be needed)
Open Regedit and navigate to Computer\\HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft*snip*

Newer Posts More - Older Posts