Search found 365 matches

by em_uk
Tue Jan 04, 2022 5:39 pm
Forum: Raspberry PI
Topic: Generate C source
Replies: 2
Views: 1759

Re: Generate C source

Awesome thanks - that works perfect.
by em_uk
Tue Jan 04, 2022 4:25 pm
Forum: Raspberry PI
Topic: Generate C source
Replies: 2
Views: 1759

Generate C source

Loving PB for armhf!

Is it possible to generate the C source created by pbcompiler?

I am writing programs on Bullseye and then running on stretch (its like an embedded system so no easy way to upgrade).

Basic console exe work great however if I am linking to libs such a pigpio they get tied to a ...
by em_uk
Thu Dec 30, 2021 6:30 pm
Forum: Raspberry PI
Topic: Serial Ports, IO-Ports, I2C and the use of PIGPIO Library
Replies: 15
Views: 10203

Re: Serial Ports, IO-Ports, I2C and the use of PIGPIO Library

hey guys, loving all the info - its been really helpful so far. I've been able to build console exes that run on a cut down dietpi.

I originally used @User_Russian's example of writing to the GPIO pins, but have found this to be far too slow for my needs and started to look at hitting the memory ...
by em_uk
Sun Dec 13, 2020 12:09 am
Forum: Coding Questions
Topic: Data inside a structure
Replies: 3
Views: 1297

Re: Data inside a structure

Not to worry,

I've changed it to

Code: Select all

Structure LayersStructure
  Array Data.i(64)
EndStructure
Now I can access with Scenes(0)\Data(0)
by em_uk
Sat Dec 12, 2020 11:50 pm
Forum: Coding Questions
Topic: Data inside a structure
Replies: 3
Views: 1297

Data inside a structure

Hi guys and gals.

I am trying to store multiple blobs of 16 bytes - so I thought the easiest way would be to create a list.


Structure LayersStructure
List Data.i()
EndStructure

Global Dim Scenes.LayersStructure(100)

I now have an array with each element containing a Data() integer with a size ...
by em_uk
Thu Oct 29, 2020 6:51 pm
Forum: Coding Questions
Topic: Help with JSON (again)
Replies: 10
Views: 2218

Re: Help with JSON (again)

infratec wrote:Have you ever tried my version?
Is it working or not?
Thanks guys - both do work on my test data. That's helped me understand how you read into the object data.
by em_uk
Thu Oct 29, 2020 6:36 pm
Forum: Coding Questions
Topic: Help with JSON (again)
Replies: 10
Views: 2218

Re: Help with JSON (again)

Thanks guys, just catching up now.

If you want the full json its here - I have truncated the data in line 13 because its pretty large

https://pastebin.com/74aPP5Gm
by em_uk
Thu Oct 29, 2020 2:58 pm
Forum: Coding Questions
Topic: Help with JSON (again)
Replies: 10
Views: 2218

Help with JSON (again)

Hi PB'ers -

I have had a look on the forum and there's lots of posts regarding reading bits of JSON but nothing that I've been able to refer to to help do what I need: I have an exported JSON from with Tiled - I need to read the "layers" element, the pull out that data. I've tried freak's ...
by em_uk
Thu Oct 15, 2020 7:37 pm
Forum: Coding Questions
Topic: Dragging images around a Canvas
Replies: 3
Views: 1311

Re: Dragging images around a Canvas

I had a specific use case, it wasn't just dragging images, more for a palette layout so it needed to insert tiles in order, my solution (not the prettiest):

Global Window_1

Global Canvas_TileDisplay

Global Dim imagetiles(256)


Procedure OpenWindow_1(x = 0, y = 0, width = 600, height = 400 ...
by em_uk
Thu Oct 15, 2020 4:17 am
Forum: Coding Questions
Topic: Dragging images around a Canvas
Replies: 3
Views: 1311

Re: Dragging images around a Canvas

I seemed to have solved it by splitting up left/right from up and down, drawing the tiles to a backbuffer image then regrabbing.
by em_uk
Thu Oct 15, 2020 1:43 am
Forum: Coding Questions
Topic: Dragging images around a Canvas
Replies: 3
Views: 1311

Dragging images around a Canvas

Hi guys,

I have a requirement to be able to re-organise a number of "tiles" on a canvas, while my routine works well horizontally, vertically is swaps the blocks and really I would want to insert the block and push the tiles along.

I can't seem to think of a way to do this, any ideas? Example here ...
by em_uk
Wed Jul 15, 2020 7:12 pm
Forum: Coding Questions
Topic: Floyd–Steinberg Not Working Quite Right....
Replies: 8
Views: 2231

Re: Floyd–Steinberg Not Working Quite Right....

Excellent improvement wilbert, with added asm. Lovely.

Thanks again - this is something I will consider in future as its not something immediately apparent, to me anyway :)
by em_uk
Wed Jul 15, 2020 6:03 pm
Forum: Coding Questions
Topic: Floyd–Steinberg Not Working Quite Right....
Replies: 8
Views: 2231

Re: Floyd–Steinberg Not Working Quite Right....

Thanks guys

Interesting as the types were specifically stated to be floats or ints in processing. I am trying to figure out why processing wants it one way and PB wants it another.

The source video was from here : https://www.youtube.com/watch?v=0L2n8Tg2FwI

Processing must be doing something ...