Go to advanced search

by bitbank
Wed May 15, 2019 6:32 am
Forum: C/C++
Topic: I just 'open sourced' my SSD1306 I2C OLED code
Replies: 17
Views: 6758

Re: I just 'open sourced' my SSD1306 I2C OLED code

I wanted to thank you for sharing your library! I have a few questions how do you customize the font? I would just want to add some custom symbols. Is it best to define a new font or extend one that exists? As I've never used an OLED until yesterday I was wondering how difficult is it to add suppor...
by bitbank
Tue May 14, 2019 8:12 pm
Forum: C/C++
Topic: I just 'open sourced' my SSD1306 I2C OLED code
Replies: 17
Views: 6758

Re: I just 'open sourced' my SSD1306 I2C OLED code

Thanks, what about utf-8 and multi-language. I was stuck with some library and I had to make my own also. I changed one libray that I found and create a table of characters using utf-8. To minimize the cost in rom size you could specify which character you want. https://github.com/danjperron/ssd133...
by bitbank
Tue May 14, 2019 1:28 pm
Forum: C/C++
Topic: I just 'open sourced' my SSD1306 I2C OLED code
Replies: 17
Views: 6758

Re: I just 'open sourced' my SSD1306 I2C OLED code

I've mostly been making updates to the Arduino version of this code, but today I just pushed an update which adds support for all common display sizes (128x64, 128x32, 64x32, 132x64). I also updated the sample code to make it run without modification on Raspbian and other Linux distros (different I2...
by bitbank
Fri Mar 01, 2019 4:16 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: I2C scanner + detector
Replies: 0
Views: 143

I2C scanner + detector

I've written a 'smart' I2C scanner program that can identify the devices it detects. It does this by querying the "Who_Am_I" registers of chips which support it and otherwise using the power on state of the registers. It currently detects 18 common I2C devices. This is useful for several situations,...
by bitbank
Mon Sep 10, 2018 3:03 pm
Forum: Advanced users
Topic: IR laser ToF VL53L1X , C++, VL53L0X
Replies: 1
Views: 1021

Re: IR laser ToF VL53L1X , C++, VL53L0X

The code is not compatible, but Sparkfun recently released an open source library to support the VL53L1X with all of the magic numbers to make it work:

https://github.com/sparkfun/SparkFun_VL ... no_Library
by bitbank
Fri Aug 17, 2018 7:35 pm
Forum: Off topic discussion
Topic: With software, there's always a better way to do it
Replies: 24
Views: 4458

Re: With software, there's always a better way to do it

bitbank, With software, there's always a better way to do it True enough. The question might be: What do you mean by "better"? Is maximum performance the main criteria? Or perhaps quick and cheap development time. Or a simple clear expression of an algorithm (As is the case with the reference examp...
by bitbank
Thu Aug 16, 2018 4:15 pm
Forum: Off topic discussion
Topic: With software, there's always a better way to do it
Replies: 24
Views: 4458

Re: With software, there's always a better way to do it

2) Most of the optimization work I've done on open source code is not modifying the original code, but tossing it out and starting from a clean slate to replace it. I have made changes to FOSS code that ships in products and the project management team understands the GPL implications. I asked abou...
by bitbank
Thu Aug 16, 2018 4:07 pm
Forum: Off topic discussion
Topic: With software, there's always a better way to do it
Replies: 24
Views: 4458

Re: With software, there's always a better way to do it

"Optimization" to programming is rather like "efficiency" to engineering. It depends on what you want to "effish". Pure optimization may or may not be good, depending on context. Can the resultant code be maintained, and--especially--maintained by mere mortals, rather than requiring your god-like s...
by bitbank
Thu Aug 16, 2018 3:27 pm
Forum: Off topic discussion
Topic: With software, there's always a better way to do it
Replies: 24
Views: 4458

Re: With software, there's always a better way to do it

What on earth is that supposed to mean? The software that runs the world has been developed over that last 50 years and is now being optimised in hardware with every new processor (just wait for commercial scale quantum computers). The compilers (even good old COBOL) have been making code that's as...
by bitbank
Thu Aug 16, 2018 12:45 pm
Forum: Off topic discussion
Topic: With software, there's always a better way to do it
Replies: 24
Views: 4458

Re: With software, there's always a better way to do it

bitbank, It's not surprised that the OpenEXR code you talk about is not particularly optimized. It's a reference implementation and as such I would expect it to be written for maximum accuracy, understandability and portability. Whist your optimized version sounds like a grate piece of work I presu...
by bitbank
Thu Aug 16, 2018 12:41 pm
Forum: Off topic discussion
Topic: With software, there's always a better way to do it
Replies: 24
Views: 4458

Re: With software, there's always a better way to do it

The bigger picture - the software that runs the world falls in the same bucket. What on earth is that supposed to mean? The software that runs the world has been developed over that last 50 years and is now being optimised in hardware with every new processor (just wait for commercial scale quantum...
by bitbank
Thu Aug 16, 2018 12:37 pm
Forum: Off topic discussion
Topic: With software, there's always a better way to do it
Replies: 24
Views: 4458

Re: With software, there's always a better way to do it

Once you've taken the x264 open source library and optimised that run even faster then I think I might believe you. Until then I found your article lacking in any real statistical relevance. You've extrapolated from one open source library to say the same thing happens in tens of thousands of other...
by bitbank
Wed Aug 15, 2018 8:06 pm
Forum: Off topic discussion
Topic: With software, there's always a better way to do it
Replies: 24
Views: 4458

With software, there's always a better way to do it

My latest blog post on open source software and (lack of) optimization

http://bitbanksoftware.blogspot.com/201 ... r-way.html
by bitbank
Sat Aug 11, 2018 11:02 pm
Forum: Automation, sensing and robotics
Topic: C Library for VL53L0X time of flight distance sensor
Replies: 2
Views: 4285

Re: C Library for VL53L0X time of flight distance sensor

elicorrales wrote:
Tue Aug 07, 2018 1:47 pm
Hello,

do you know if your library would be compatible with VL53L1X?

thanks
Unfortunately, it's not. STMicro decided to create a new set of magic numbers to hide their hardware again.
by bitbank
Wed Aug 01, 2018 1:07 pm
Forum: Windows 10 for IoT
Topic: Win IoT Core on RPI being abandoned?
Replies: 8
Views: 3318

Re: Win IoT Core on RPI being abandoned?

W. H. Heydt wrote:
Wed Aug 01, 2018 2:17 am
It seems unlikely that a company the size of MS would use eBay to get rid of surplus equipment.
Follow the link and you'll see MS is the seller
by bitbank
Wed Aug 01, 2018 12:05 am
Forum: Windows 10 for IoT
Topic: Win IoT Core on RPI being abandoned?
Replies: 8
Views: 3318

Win IoT Core on RPI being abandoned?

Microsoft is in the process of liquidating their RPI 3B and 16GB sd card kits for $14 on Ebay: https://www.ebay.com/itm/Raspberry-Pi-3-Board-and-16GB-10class-with-NOOBS/283079338451 This could indicate 2 things: 1) They're clearing stock for the 3B+ 2) They're abandoning Windows IoT Core on the RPI ...
by bitbank
Wed May 23, 2018 7:23 pm
Forum: General discussion
Topic: Practical animation on I2C SSD1306 OLED displays
Replies: 0
Views: 306

Practical animation on I2C SSD1306 OLED displays

I'm working on an RPI + Arduino project for displaying complex animated sequences on I2C OLEDs at high frame rates. I've written a blog post about it and will be releasing the code as open-source shortly. My article mostly talks about how I got it to work on very constrained devices like the ATtiny8...
by bitbank
Sun Apr 08, 2018 11:25 pm
Forum: C/C++
Topic: LIS3MDL pigpio I2C multiple byte read - data does not update
Replies: 3
Views: 1498

Re: LIS3MDL pigpio I2C multiple byte read - data does not update

You need to share the rest of your code. If you don't initialize the sensor and tell it a sampling frequency, it won't sample new data. The behavior you're seeing would occur if you haven't properly initialized the sensor. Also, it probably is not needed to explicitly call i2cSwitchCombined(). Norma...
by bitbank
Tue Apr 03, 2018 1:57 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Best way to shift 5V down to 3.3V for GPIO pin
Replies: 5
Views: 1834

Re: Best way to shift 5V down to 3.3V for GPIO pin

Your case is the simplest for adapting the signal. You're reading a signal that's higher voltage than your GPIO can handle. Simply use a voltage divider comprised of 2 resistors. One with twice the resistance of the other. You'll form a voltage divider which will output 2/3 of the voltage (3.3v on t...
by bitbank
Thu Mar 22, 2018 1:49 pm
Forum: Advanced users
Topic: How can I compile arm assembly? how can i make a file and access it.
Replies: 2
Views: 646

Re: How can I compile arm assembly? how can i make a file and access it.

I just know how to do basic stuff with registers and need to know this stuff. Take a look at my gcc_perf project. I compare the speed of compiled C versus SIMD intrinsics versus hand coded assembly language (ARM). You can see how to compile/link it from my example: https://github.com/bitbank2/gcc_p...
by bitbank
Sat Mar 17, 2018 11:16 pm
Forum: General discussion
Topic: 4-Digit Display on TM1637
Replies: 10
Views: 12739

Re: 4-Digit Display on TM1637

I also bought some of those inexpensive displays (68 cents each) and wrote my own library to make it easier to control them. I have an Arduino and Linux version:

https://github.com/bitbank2/tm1637

Image
by bitbank
Wed Mar 14, 2018 4:12 pm
Forum: C/C++
Topic: The most efficient way to transfer SPI data
Replies: 9
Views: 4393

Re: The most efficient way to transfer SPI data

Sounds like you need to get a capable MCU like a Cortex-M to manage the data reading and then pass it on to the RPI in asynchronous chunks. Even with Joan's great SPI code, there will be timing hiccups on any Linux system reading a real-time stream. There will be gaps between each block read from th...
by bitbank
Sun Mar 11, 2018 8:40 pm
Forum: C/C++
Topic: C library for MAX7219 LED Matrix controllers
Replies: 1
Views: 1299

C library for MAX7219 LED Matrix controllers

I bought one of those 4-in-1 (8 rows x 32 columns) LED kits that consists of 4 8x8 blocks linked together and controlled by Maxim's MAX7219 controllers. I read the data sheet and wrote some C code to make it easy to control them: https://github.com/bitbank2/MAX7219 I tested it on my Orange Pi Lite, ...
by bitbank
Sun Mar 11, 2018 3:07 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: 8x32/weather station/raspberry 3 raspian lite
Replies: 2
Views: 657

Re: 8x32/weather station/raspberry 3 raspian lite

I have the same LED matrix and it's composed of 4 MAX7219 controllers connected in a cascade fashion. It's quite easy to control over SPI. I just started programming it yesterday by reading the datasheet and in a few lines of code created a scrolling display (without external libraries). I started b...
by bitbank
Fri Feb 23, 2018 7:08 pm
Forum: C/C++
Topic: UC1701 128x64 monochrome LCD
Replies: 0
Views: 770

UC1701 128x64 monochrome LCD

I just released a C library for drawing text and graphics on this LCD. I chose this LCD because it looked like a good replacement for the lower quality Nokia 5110's in circulation. The qualities I was looking for were: 1) Low cost 2) Transflective (visible in sunlight without the backlight on) 3) Lo...

Go to advanced search