Post about your Basic project here

Moderator: Mmiscool

User avatar
By heckler
#37283 Hey Group,

I knocked up this test circuit that uses an I2C OLED display and 3 ds18B20 temp sensors.
It shows the date/time and the Centigrade value of the three temp sensors.
The temperature updates every 5 seconds.
The time updates every 30 seconds.
By the way it is running off an old cell phone battery at 3.3 vdc

It continues to amaze me at the power of this ESP BASIC and the little ESP-01 module.

Take note that the display and the three temp sensors all share the same data/clock pin.

@Mike... feel free to post this as an example project if you like.

regards, Dwight


Code: Select allmemclear
counter = 0
delay 1000

button "Temperature" [gettemp]
button "Exit " [Exit]
gosub [gettime]
timer 5000 [gettemp]
counter = counter + 1
if counter = 6 then gosub [gettime]
temp 0 curr
oledprint curr 0 0
temp 1 curr
oledprint curr 0 2
temp 2 curr
oledprint curr 0 4
oledprint ramfree() 0 6
oledprint flashfree() 0 7
counter = 0
bla = time()
dw = mid(bla,1,3) 'dow
mh = mid(bla,5,3) 'month
dt = mid(bla,9,2) 'date
hh = mid(bla,12,2) 'hour
mm = mid(bla,15,2) 'min
ss = mid(bla,18,2) 'sec
yr = mid(bla,21,4) 'year
oledprint dw 8 0
oledprint mh 8 1
oledprint dt 12 1
oledprint yr 8 2
oledprint hh 8 4
oledprint ":" 10 4
oledprint mm 11 4


If you want to convert to Farenheit...
Code: Select alltemp 0 curr
tf = curr * 9
tf = tf / 5
tf = tf + 32
You do not have the required permissions to view the files attached to this post.
Last edited by heckler on Wed Mar 22, 2017 9:16 pm, edited 3 times in total.
User avatar
By forlotto
#37358 Beautiful project well done!

Thanks a million for sharing I was wondering if this could be done with a screen after seeing the espbasic screen that was done by mmiscool.

Keep them coming great work!
User avatar
By heckler
#37380 It may not be obvious to newbies in the picture above that the ESP -01 module is actually plugged into an adapter to allow it to be inserted into the breadboard.

Also if you were wondering how to get a photo or drawing inserted into your post... the way I do it is to place the image file into my DROPBOX "public" folder, then rightclick on the file and "copy public link" then paste it in your post between the
"[img.][/img.]" like that.

does anyone know of an easier/better way??

I also use a tool called "faststone capture"
that works GREAT for grabbing/cutting screen shots, etc. and I have used for years.

Their photo viewer is also very nice