Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 05-21-2020, 09:23 AM   #16
coplate
Guru
coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.
 
Posts: 645
Karma: 1888888
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
Quote:
Originally Posted by ChronosHD View Post
Is the pageturnd code available? I would experiment with it, my touchscreen is dead, so I´m looking for a workaround to still use the kindle somehow.
I still couldn't find my pageturnd sourcecode, I think it is on a VM but I am not sure which one.

I did find the ESP8266 wifi code that I used as the remote control, in order to skip running a hotspot on my phone. This is running an an adafruit feather ESP8266 wifi board, with two buttons:

Code:
wifiConfig = {}



-- wifi.STATION         -- station: join a WiFi network

-- wifi.SOFTAP          -- access point: create a WiFi network

-- wifi.wifi.STATIONAP  -- both station and access point

wifiConfig.mode = wifi.SOFTAP  -- both station and access point



wifiConfig.accessPointConfig = {}

wifiConfig.accessPointConfig.ssid = "KNDL"   -- Name o                                                                                                                                                             f the SSID you want to create

wifiConfig.accessPointConfig.pwd = "32165498"    -- WiFi password - at least 8 c                                                                                                                                                             haracters



wifiConfig.accessPointIpConfig = {}

wifiConfig.accessPointIpConfig.ip = "192.168.111.1"

wifiConfig.accessPointIpConfig.netmask = "255.255.255.0"

wifiConfig.accessPointIpConfig.gateway = "192.168.111.1"





wifi.setmode(wifiConfig.mode)

print('set (mode='..wifi.getmode()..')')



if (wifiConfig.mode == wifi.SOFTAP) or (wifiConfig.mode == wifi.STATIONAP) then

    print('AP MAC: ',wifi.ap.getmac())

    wifi.ap.config(wifiConfig.accessPointConfig)

    wifi.ap.setip(wifiConfig.accessPointIpConfig)

end



print('chip: ',node.chipid())

print('heap: ',node.heap())



wifiConfig = nil

collectgarbage()



-- End WiFi configuration





function pageTurn(command)

        conn = nil



        conn=net.createConnection(net.TCP, 0)



        conn:on("receive", function(conn, payload)

         print(payload)

         end)



         -- when connected, request page (send parameters to a script)

        conn:on("connection", function(conn, payload)

         print('\nConnected')

         conn:send(command)

         end)



         -- when disconnected, let it be known

        conn:on("disconnection", function(conn, payload)

          print('\nDisconnected')

          end)



        conn:connect(5001,'192.168.111.57')

end

function pageBack()

        pageTurn("R")

end

function pageForward()

        pageTurn("L")

end



do



  -- use pin 3 as the input pulse width counter

  local pin3, pin4, pulse1, du, now, trig = 3, 4, 0, 0, tmr.now, gpio.trig

  gpio.mode(pin3,gpio.INT)

  gpio.mode(pin4,gpio.INT)



  local function pincb(pin, level)

        trig(pin,  "none")

    local pulse2 = now()

    print( pin, level, gpio.HIGH, level == gpio.HIGH,level == gpio.HIGH  and "do                                                                                                                                                             wn" or "up",  "down", "up", pulse2 - pulse1 )

    pulse1 = pulse2



        if (pin == pin3) and ( level == gpio.HIGH ) then

          pageBack()

        end

        if (pin == pin4) and ( level == gpio.HIGH ) then

          pageForward()

        end

    trig(pin, level == gpio.HIGH  and "down" or "up")



  end

  trig(pin3, "down", function(level) pincb(pin3, level) end)

  trig(pin4, "down", function(level) pincb(pin4, level) end)

end
coplate is offline   Reply With Quote
Old 05-21-2020, 11:21 AM   #17
arooni
Addict
arooni began at the beginning.
 
Posts: 315
Karma: 26
Join Date: Jul 2012
Device: Kindle Paperwhite 4 (2018)
so how did the remote work physically? I see the esd which just looks like a chip. Would this work with koreader ?
arooni is offline   Reply With Quote
Old 05-21-2020, 05:25 PM   #18
coplate
Guru
coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.
 
Posts: 645
Karma: 1888888
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
Quote:
Originally Posted by arooni View Post
so how did the remote work physically? I see the esd which just looks like a chip. Would this work with koreader ?
Image attached, It is wired up to two buttons.
Attached Thumbnails
Click image for larger version

Name:	20200521_162143.jpg
Views:	142
Size:	444.5 KB
ID:	179408  
coplate is offline   Reply With Quote
Reply

Tags
cross-compile, pageturnd


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Remote Page Turning Controller frostschutz Kobo Developer's Corner 45 08-25-2020 12:49 PM
Page turning remote / App wanted jskvbinmv Kindle Developer's Corner 16 09-11-2014 12:35 PM
Paperwhite Page Count Method marcl Amazon Kindle 5 10-09-2013 11:44 AM
PRS-600 How is battery life affected by turn off method Dave W Sony Reader 5 10-13-2009 11:45 PM
Automatic page turn / remote Working Prototype gregcd Sony Reader 5 09-14-2009 07:38 PM


All times are GMT -4. The time now is 01:04 PM.


MobileRead.com is a privately owned, operated and funded community.