Skip to content

A demo project that connects a BastWAN with a PyGamer via I2C.

License

Notifications You must be signed in to change notification settings

Kongduino/BastWAN_I2C_LoRa_Bridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BastWAN_I2C_LoRa_Bridge

See this Twitter thread for background info. This is the first half of the project, the Bastwan side of things. The PyGamer code is here.

Since the PyGamer has Feather headers at the back, I thought it would be a cool idea to stick a BastWan there and use the whole setup as a LoRa distance test kit. However there are a few issues, notable plugging in a BastWanas is freezes the PyGamer – I suspect one of the Vcc pins conflicts with it; it is nigh impossible to cross Tx1 and Rx1 on either side. So I decide to switch to I2C for communication between the devices – which works fine. The back layer makes connecting the BastWan a little difficult, and it wobbles a lot, especially on 3 or 4 pins only – for now I have only 3 pins connecter, SDA, SCL, GND, leaving 3V connected by a Dupont cable so that I can remove it and connect the USB cable instead when I want to look at the Serial Monitor. I added female headers to give more space to the BastWan – and its SMA antenna connector – and things are now more stable. Adding pins on both sides – those that won't cause a freeze, like the Ax and Dx pins – helps too.

3 Pins 1 Cable

3 pins and a cable

Headers

Adding female headers helps stabilizing the BastWan

To make things simple and fast, I am using for now the termio library by BeBoXos, which works great. I get to have a small UI with zero effort thanks to this library. It is sure not sexy, but this is (Circuit)Python. If I wanted sexy I'd use something else, and a bigger screen.

termio

Simple, fast and efficient!

It doesn't mean we can't do a little fancy! Since the PyGamer has 5 neopixels, we might has well make use of them. Here's what it looks like when a message is received:

incoming

Isn't that cute?

The plan is to add quite a few more features, but for now it'll do!

Notable tidbits

The Commands.h implements a text commands system that is easily extendable, and very easy to use. Also, while I am not making use of it in this early version, it comes with batteries included, aka AES encryption. Finally, the I2C communication code is probably worth a look.

About

A demo project that connects a BastWAN with a PyGamer via I2C.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published