1
00:00:02,320 --> 00:00:03,880
Speaker 1: Welcome to the CircuitPython Show.

2
00:00:04,200 --> 00:00:05,280
Speaker 1: I'm your host, Paul Cutler.

3
00:00:05,880 --> 00:00:08,200
Speaker 1: This episode, I'm joined by three former guests on the show,

4
00:00:08,740 --> 00:00:11,380
Speaker 1: Dan Cogliano, Tim Cox, and Cooper Dalrymple.

5
00:00:12,220 --> 00:00:14,200
Speaker 1: They've joined me to chat about the Adafruit Fruit Jam,

6
00:00:14,620 --> 00:00:16,040
Speaker 1: which was first released last July

7
00:00:16,240 --> 00:00:18,600
Speaker 1: and shipped to Adabox subscribers this past November.

8
00:00:19,340 --> 00:00:20,640
Speaker 1: The Fruit Jam runs CircuitPython

9
00:00:20,980 --> 00:00:22,680
Speaker 1: and is a credit card-sized microcomputer

10
00:00:23,180 --> 00:00:26,660
Speaker 1: with display support, USB host for mice keyboards and game pads,

11
00:00:27,000 --> 00:00:29,980
Speaker 1: and SD card, expansion GPIO, and more.

12
00:00:31,760 --> 00:00:33,300
Speaker 1: Tim, Dan, and Cooper, welcome to the show.

13
00:00:34,040 --> 00:00:34,560
Speaker 1: Hey, Paul.

14
00:00:35,620 --> 00:00:35,860
Speaker 1: Hey, Paul.

15
00:00:35,960 --> 00:00:36,620
Speaker 1: Thanks for having us.

16
00:00:37,100 --> 00:00:37,320
Speaker 1: Thanks.

17
00:00:38,320 --> 00:00:39,160
Speaker 1: Tim, we'll start with you.

18
00:00:39,700 --> 00:00:43,180
Speaker 1: The Fruit Jam hardware can run Fruit JamOS, which is a new way to load a circuit

19
00:00:43,440 --> 00:00:44,080
Speaker 1: Python application.

20
00:00:44,860 --> 00:00:47,860
Speaker 1: What was the inspiration for Fruit JamOS and how does it work?

21
00:00:48,960 --> 00:00:49,540
Speaker 1: Yeah, good question.

22
00:00:49,700 --> 00:00:55,320
Speaker 2: So for Adafruit generally, one of our big goals going into Fruit JamOS was to make something

23
00:00:55,560 --> 00:00:59,920
Speaker 2: that sort of harkens back to like the Commodore 64 era of devices.

24
00:01:00,140 --> 00:01:04,320
Speaker 2: sort of all-in-one devices that you write the programs on there, you run the programs on there.

25
00:01:05,019 --> 00:01:06,840
Speaker 2: Back in those days, they had the keyboard built in.

26
00:01:06,960 --> 00:01:08,700
Speaker 2: They had the little display built in.

27
00:01:08,820 --> 00:01:10,340
Speaker 2: So everything was ready to go for you.

28
00:01:10,780 --> 00:01:13,720
Speaker 2: Just kind of plug it in, start programming and do your thing.

29
00:01:13,860 --> 00:01:19,620
Speaker 2: So that was a big inspiration going into Fruit Jam OSbroadly for all the Adafruit folks.

30
00:01:19,880 --> 00:01:24,320
Speaker 2: And then for me specifically, I would say also there was emphasis on Q Basic.

31
00:01:24,760 --> 00:01:28,200
Speaker 2: QBASIC was one of the first programming languages that I ever interacted with.

32
00:01:28,320 --> 00:01:31,140
Speaker 2: So it's always held a sort of nostalgic place in my heart.

33
00:01:32,140 --> 00:01:35,900
Speaker 2: And as I was working on Fruit JamOS, I kind of got, you know,

34
00:01:35,940 --> 00:01:39,860
Speaker 2: it took me back to that era of Q Basic IDE where it was similar.

35
00:01:40,040 --> 00:01:41,300
Speaker 2: It had the editor built in.

36
00:01:41,380 --> 00:01:44,000
Speaker 2: You could pop over and run your code real fast right there.

37
00:01:44,580 --> 00:01:48,280
Speaker 2: And it was just this all in one sort of package, write your code, run your code,

38
00:01:48,680 --> 00:01:51,880
Speaker 2: see what it does right there and iterate through very quickly.

39
00:01:52,040 --> 00:01:55,160
Speaker 2: So that was another big one for me was QBASIC.

40
00:01:55,920 --> 00:02:00,160
Speaker 1: What's involved that add support to a normal CircuitPython program to run on Fruit Jam OS?

41
00:02:01,040 --> 00:02:01,180
Speaker 2: Yeah.

42
00:02:01,680 --> 00:02:06,480
Speaker 2: So it's pretty straightforward, especially if your program is already set up for the Fruit Jam,

43
00:02:06,620 --> 00:02:09,619
Speaker 2: if you're already making use of the Fruit Jam peripherals and stuff like that.

44
00:02:09,960 --> 00:02:13,260
Speaker 2: If you have something completely unrelated, like it's a Pi portal program or something,

45
00:02:13,360 --> 00:02:16,080
Speaker 2: there's a little bit more converting that needs to take place.

46
00:02:16,220 --> 00:02:21,580
Speaker 2: But if you've got an app that you have already used on a Fruit Jam today by just saving it in code.

47
00:02:22,260 --> 00:02:23,160
Speaker 2: It's very straightforward.

48
00:02:23,420 --> 00:02:25,720
Speaker 2: You can just create an icon for it, or even,

49
00:02:25,740 --> 00:02:27,300
Speaker 2: even just leave it the default one if you want.

50
00:02:27,490 --> 00:02:30,020
Speaker 2: Create a little metadata file that has the name of your app.

51
00:02:30,070 --> 00:02:32,120
Speaker 2: It has the file path to the icon.

52
00:02:32,660 --> 00:02:36,920
Speaker 2: You store that alongside your code and you copy your code with a folder into the

53
00:02:37,080 --> 00:02:38,700
Speaker 2: app's directory on CircuitPy.

54
00:02:39,420 --> 00:02:40,300
Speaker 2: And that's all you need to do.

55
00:02:40,420 --> 00:02:43,640
Speaker 2: The next time you launch the Fruit Jam OS launcher, it scans that folder.

56
00:02:43,820 --> 00:02:46,680
Speaker 2: So it will automatically find your app along with all the other ones.

57
00:02:47,080 --> 00:02:48,900
Speaker 2: We'll show your icon right on the launcher there.

58
00:02:49,140 --> 00:02:50,000
Speaker 2: User can launch it.

59
00:02:50,060 --> 00:02:52,340
Speaker 2: And as soon as they launch it, it just executes right into your code.

60
00:02:52,380 --> 00:02:57,660
Speaker 1: code.pye file. I know Cooper you I had Sean Carolan on the show recently who did the

61
00:02:57,750 --> 00:03:02,960
Speaker 1: Pac-Man clone in CircuitPython and you reached out to him and gave him a hand to and submitted a PR

62
00:03:02,970 --> 00:03:08,480
Speaker 1: I believe to get it on the fruit jam. Yeah and actually I want to add to that I did create a repository

63
00:03:09,530 --> 00:03:13,880
Speaker 3: and if viewers aren't familiar with how GitHub works basically repository is like a project right

64
00:03:14,180 --> 00:03:19,520
Speaker 3: I did create a project that's just fruit jam application I was trying to make it as basic as possible

65
00:03:19,700 --> 00:03:24,480
Speaker 3: just to be a place to store all those best practices of how to work with this hardware.

66
00:03:25,080 --> 00:03:30,700
Speaker 3: Of course, many users have contributed applications in their own way that may do things a little bit differently.

67
00:03:30,880 --> 00:03:33,820
Speaker 3: But it's always good to have a good foundation of where to start.

68
00:03:34,300 --> 00:03:38,840
Speaker 3: And that does stuff like initializing the display properly, handling different resolutions,

69
00:03:39,820 --> 00:03:43,160
Speaker 3: taking it in keyboard and mouse input and stuff, which I know we'll get into later.

70
00:03:44,140 --> 00:03:49,480
Speaker 1: Cooper, you were one of the first in the community to release a game for the Fruit Jam, Frutris, a Tetris clone.

71
00:03:50,260 --> 00:03:56,960
Speaker 1: You've also done some work behind the scenes working on USB host for game pads, fruit jam OS, and more like you just mentioned.

72
00:03:57,640 --> 00:03:59,720
Speaker 1: What grabbed you and excited you about the fruit jam?

73
00:04:00,300 --> 00:04:02,100
Speaker 1: So I remember when the fruit jam first came out.

74
00:04:02,240 --> 00:04:05,900
Speaker 3: This was last year, was it August or something?

75
00:04:06,260 --> 00:04:06,740
Speaker 3: It was July.

76
00:04:06,800 --> 00:04:07,260
Speaker 3: Is that, okay.

77
00:04:07,440 --> 00:04:07,640
Speaker 3: Yeah, yeah.

78
00:04:08,640 --> 00:04:13,560
Speaker 3: And I really wanted to be a part of that like first initial push on it, that wave.

79
00:04:14,020 --> 00:04:19,220
Speaker 3: And I was playing around with Fruit JamOS because at that time, Tim, you had already had it working.

80
00:04:19,340 --> 00:04:21,940
Speaker 3: and a few applications bundled in from the Learnn guides.

81
00:04:22,510 --> 00:04:28,440
Speaker 3: And I have to admit, I wasn't in on the Metro 2350B days, the really early development.

82
00:04:29,320 --> 00:04:32,780
Speaker 3: But a lot of that I know came from that era, I would say.

83
00:04:33,620 --> 00:04:39,060
Speaker 3: And I knew I was like, I have to do something here, you know, something that I can turn around, turn and burn very quickly,

84
00:04:39,540 --> 00:04:41,200
Speaker 3: just because I was excited to be a part of everything.

85
00:04:41,820 --> 00:04:43,260
Speaker 3: And we were lacking Tetris.

86
00:04:43,440 --> 00:04:44,280
Speaker 3: You know, we had a lot of other things.

87
00:04:44,380 --> 00:04:46,580
Speaker 3: I think mine sweeper, breakout, so on.

88
00:04:46,860 --> 00:04:49,020
Speaker 3: And Testris is a different beast.

89
00:04:49,540 --> 00:04:51,420
Speaker 3: because there is some math involved

90
00:04:51,900 --> 00:04:53,180
Speaker 3: and a little bit more management

91
00:04:53,180 --> 00:04:55,560
Speaker 3: in order to make it a really good

92
00:04:55,620 --> 00:04:57,040
Speaker 3: Tetris experience, right?

93
00:04:57,540 --> 00:04:58,380
Speaker 3: And so I did my best.

94
00:04:58,620 --> 00:05:00,260
Speaker 3: And actually, the work on that,

95
00:05:00,340 --> 00:05:02,200
Speaker 3: I had actually kind of stolen for myself.

96
00:05:02,840 --> 00:05:04,360
Speaker 3: I don't know if anyone here is familiar

97
00:05:04,560 --> 00:05:06,100
Speaker 3: with Look Mum, no computer.

98
00:05:06,720 --> 00:05:09,700
Speaker 3: It's kind of a techie, YouTuber, crazy guy.

99
00:05:10,420 --> 00:05:12,000
Speaker 3: He did a thing forever ago

100
00:05:12,540 --> 00:05:13,360
Speaker 3: called the Mega Machine,

101
00:05:14,000 --> 00:05:18,139
Speaker 3: which was, gosh, it was like a 10 by 10 array

102
00:05:18,280 --> 00:05:24,320
Speaker 3: of Game Boys in which you could control the screen of each one of them.

103
00:05:24,860 --> 00:05:29,480
Speaker 3: And he was looking for input back then for like applications, stuff.

104
00:05:29,480 --> 00:05:32,520
Speaker 3: He could run on these like 100 Game Boys, right?

105
00:05:33,020 --> 00:05:38,360
Speaker 3: And I just thought it was very meta to make Tetris that played on like 100 Game Boys, right?

106
00:05:38,840 --> 00:05:43,380
Speaker 3: Anyway, even though that was kind of a silly thing, a lot of the code came from that for the actual

107
00:05:43,700 --> 00:05:47,320
Speaker 3: rotation, the different Tetraminos, things like that.

108
00:05:47,400 --> 00:05:50,300
Speaker 3: So that was very important to contribute in that way.

109
00:05:50,520 --> 00:05:55,020
Speaker 3: And I was able to get that out in, like, I think, less than a week or something, just, you know, off the ground.

110
00:05:55,440 --> 00:05:58,400
Speaker 3: I was really happy with how, you know, people, you know, started playing around with that.

111
00:05:58,480 --> 00:05:59,240
Speaker 3: It was pretty fun.

112
00:05:59,840 --> 00:06:05,520
Speaker 3: And as for those other developments, I mean, there's been a lot of foundation developed by Adafruit, U-Tem, especially.

113
00:06:06,400 --> 00:06:17,360
Speaker 3: For, like, I mean, USB host is really where everything goes down to because CircuitPython has a lot of features on it out of the box, but it's not an operating system.

114
00:06:17,380 --> 00:06:47,340
Speaker 3: really and operating systems typically handle a lot of USB handle I mean obviously keyboard I believe is handled by the supervisor right yep but things that are a little more complex like game pads especially because you know every game pad operates a little bit differently I mean you have X input D input you have it's escaping me now but um it's not X input input there's a there's a mode for K joystick's

115
00:06:47,740 --> 00:06:49,140
Speaker 3: that operate like that that you have to support.

116
00:06:49,280 --> 00:06:53,260
Speaker 3: And then some game pads, including the Adafruit, SNES gamepad,

117
00:06:53,660 --> 00:06:55,220
Speaker 3: operate like in their own weird mode.

118
00:06:55,680 --> 00:06:57,160
Speaker 3: That's just kind of difficult to support.

119
00:06:57,360 --> 00:07:01,700
Speaker 3: So obviously, for every application to include its own driver

120
00:07:01,880 --> 00:07:03,780
Speaker 3: for each one of these devices, it's just not feasible.

121
00:07:04,460 --> 00:07:06,680
Speaker 3: So that's one thing that I was able to contribute

122
00:07:07,000 --> 00:07:11,040
Speaker 3: is creating a library to at least combine that a lot together

123
00:07:11,260 --> 00:07:12,740
Speaker 3: so people just don't have to worry about it.

124
00:07:13,240 --> 00:07:15,460
Speaker 3: And I think that's when CircuitPython shines,

125
00:07:16,500 --> 00:07:18,040
Speaker 3: and you just don't have to worry about it, right?

126
00:07:18,120 --> 00:07:19,940
Speaker 3: You just make your own fun code,

127
00:07:19,940 --> 00:07:21,640
Speaker 3: and you don't have to think so much about, you know,

128
00:07:21,820 --> 00:07:24,360
Speaker 3: specific device input and stuff.

129
00:07:24,900 --> 00:07:25,580
Speaker 1: Dan, what about you?

130
00:07:25,700 --> 00:07:27,400
Speaker 1: What excited you about the Fruit Jam?

131
00:07:28,380 --> 00:07:30,020
Speaker 4: Well, first of all, thanks for having me.

132
00:07:31,260 --> 00:07:33,360
Speaker 4: I'm more on the application end of it

133
00:07:33,480 --> 00:07:34,940
Speaker 4: as opposed to the operating system,

134
00:07:35,060 --> 00:07:39,180
Speaker 4: and so I do a lot of application and user applications.

135
00:07:39,550 --> 00:07:41,580
Speaker 4: And I was really excited about it.

136
00:07:41,930 --> 00:07:43,700
Speaker 4: I mean, I grew up, you know,

137
00:07:43,780 --> 00:07:45,740
Speaker 4: with arcade games, retroarchic.

138
00:07:45,760 --> 00:07:50,840
Speaker 4: arcade games and I guess I could consider myself retro because I'm at that age.

139
00:07:51,600 --> 00:07:58,560
Speaker 4: But that really excited me with the or the different emulators that come out with it.

140
00:07:59,160 --> 00:07:59,940
Speaker 4: I think it's great.

141
00:08:00,620 --> 00:08:04,320
Speaker 4: So I decided to write some games in CircuitPython for it.

142
00:08:04,900 --> 00:08:14,140
Speaker 4: The first one was the Zork Z-Machine, which was something I wrote five or six years ago in Arduino.

143
00:08:14,160 --> 00:08:20,980
Speaker 4: And I decided, well, I'm going to convert that to CircuitPython, see if I can get reasonable performance out of it.

144
00:08:21,020 --> 00:08:21,380
Speaker 4: And I did.

145
00:08:21,620 --> 00:08:31,020
Speaker 4: So I went from there, and then I wrote a moon miner game, which is kind of like the Lunar Lander, if you remember that from the arcades back in the 80s.

146
00:08:32,280 --> 00:08:33,760
Speaker 4: So it's similar to that.

147
00:08:34,479 --> 00:08:36,039
Speaker 4: And then I wrote a couple screensavers.

148
00:08:36,219 --> 00:08:41,860
Speaker 4: So doing a bunch of fun projects, at least for me, I really enjoyed writing them.

149
00:08:42,599 --> 00:08:49,020
Speaker 4: We've got four screens savers so far, and I'm looking at maybe adding more as I find ideas for them.

150
00:08:50,260 --> 00:08:51,740
Speaker 4: And so, yeah, it's been a lot of fun.

151
00:08:52,740 --> 00:08:55,540
Speaker 1: Tell me a little bit more about the four screensavers you've written.

152
00:08:56,020 --> 00:08:57,220
Speaker 1: Can you describe them a little bit?

153
00:08:57,640 --> 00:09:00,420
Speaker 1: And, you know, what worked well about writing them for the fruit jam?

154
00:09:00,540 --> 00:09:02,580
Speaker 1: And were there any challenges that you encountered?

155
00:09:03,960 --> 00:09:07,620
Speaker 4: Well, you know, screensavers go back since the dawn of PCs.

156
00:09:08,840 --> 00:09:12,280
Speaker 4: You know, there was actually a real purpose for them at one time.

157
00:09:12,380 --> 00:09:13,560
Speaker 4: you didn't want to have the screen burn in.

158
00:09:13,660 --> 00:09:17,320
Speaker 4: So now it's more of a fun thing to see on the screen.

159
00:09:17,560 --> 00:09:19,360
Speaker 4: So I wrote four of them.

160
00:09:19,750 --> 00:09:23,520
Speaker 4: I did Starfield screensaver,

161
00:09:23,590 --> 00:09:25,300
Speaker 4: which is kind of like the Star Trek screen,

162
00:09:25,800 --> 00:09:28,320
Speaker 4: you know, with the stars going on the screen.

163
00:09:28,520 --> 00:09:34,460
Speaker 4: And I wrote a maze creator and a real-time solver.

164
00:09:35,200 --> 00:09:40,660
Speaker 4: And that actually came from an Arduino project I wrote for Adafruit,

165
00:09:40,980 --> 00:09:43,660
Speaker 4: probably six years ago, that was also Arduino.

166
00:09:43,780 --> 00:09:46,340
Speaker 4: And that was on a e-paper device.

167
00:09:46,780 --> 00:09:51,300
Speaker 4: So I thought, well, I want to do that one, rewrite that one for CircuitPython.

168
00:09:53,020 --> 00:09:54,640
Speaker 4: And that one turned out really well.

169
00:09:55,799 --> 00:10:00,860
Speaker 4: Then the recent ones I've done is a 15 puzzle screensaver.

170
00:10:01,020 --> 00:10:05,880
Speaker 4: If you ever know the child's toy where you have numbers from 1 to 15 in a grid

171
00:10:06,040 --> 00:10:10,920
Speaker 4: and you slide the tiles around, and I thought, well, this would be great for circuit.

172
00:10:10,940 --> 00:10:18,280
Speaker 4: at Python because it has tile grid and it's really the same concept except you're just taking pieces

173
00:10:18,410 --> 00:10:23,060
Speaker 4: of one image and moving around and I thought well that would be kind of a neat challenge so I did that

174
00:10:23,060 --> 00:10:29,180
Speaker 4: and that turned out really well the latest one I did was just a weather clock it's very stagnant

175
00:10:29,300 --> 00:10:36,440
Speaker 4: there's not much going on other than showing the updating the time and the current weather conditions

176
00:10:36,640 --> 00:10:40,180
Speaker 4: and the temperature so that seemed to be a good screensaver because

177
00:10:41,660 --> 00:10:43,940
Speaker 4: when you're not doing anything

178
00:10:44,210 --> 00:10:46,080
Speaker 4: the time comes up and the weather comes out.

179
00:10:46,080 --> 00:10:47,280
Speaker 4: I thought, that'd be pretty good too.

180
00:10:48,460 --> 00:10:49,580
Speaker 1: Cooper, you mentioned earlier

181
00:10:50,160 --> 00:10:53,300
Speaker 1: that you've done some work about keyboard input and game pads.

182
00:10:54,020 --> 00:10:56,040
Speaker 1: For someone who's used to writing a normal code.

183
00:10:56,040 --> 00:10:59,060
Speaker 1: code.py in CircuitPython and maybe has hooked up a few sensors over

184
00:10:59,220 --> 00:11:02,240
Speaker 1: STEMAQT, how hard is it to code for the Fruit Jam

185
00:11:02,340 --> 00:11:06,260
Speaker 1: to set up things like the display or to use keyboards or game pads?

186
00:11:07,380 --> 00:11:10,040
Speaker 3: Well, if you've ever used display I.O.

187
00:11:10,260 --> 00:11:16,600
Speaker 3: at all for, you know, little OLED displays, black and white, all that kind of, it's the exact same

188
00:11:17,490 --> 00:11:17,600
Speaker 3: API.

189
00:11:17,860 --> 00:11:23,820
Speaker 3: So, loading up bitmaps, drawing shapes with vector, vector I.O, whatever.

190
00:11:25,300 --> 00:11:29,820
Speaker 3: All that kind of stuff, it all uses the exact same principles using tile grid, et cetera.

191
00:11:30,440 --> 00:11:34,760
Speaker 3: In fact, Tim, I know you helped, I believe you helped create a lot of those APIs, right?

192
00:11:35,320 --> 00:11:39,960
Speaker 3: And tile grid in a way almost acts like a Game Boy or something like that in the way that.

193
00:11:40,040 --> 00:11:44,320
Speaker 3: you pick different sprites from a sheet and stuff like that too.

194
00:11:45,560 --> 00:11:52,500
Speaker 3: And then, of course, I know the Adafruit display text library is one that I use on basically every project.

195
00:11:53,060 --> 00:11:57,640
Speaker 3: If you want to write out displays without, I believe you can use terminal I.O. directly.

196
00:11:57,900 --> 00:11:59,220
Speaker 3: And I have done that once or twice.

197
00:11:59,980 --> 00:12:05,480
Speaker 3: But for the most part, you want to use that to get started to write text out to your display,

198
00:12:05,900 --> 00:12:06,860
Speaker 3: depending on what you're trying to do.

199
00:12:07,200 --> 00:12:11,780
Speaker 3: like what those screensaver stand was talking about you probably do principles a little bit

200
00:12:11,960 --> 00:12:15,440
Speaker 3: differently you know you're not working directly with input and stuff like that you kind of needs

201
00:12:15,440 --> 00:12:21,620
Speaker 3: to run itself and so you might not use some of these resources which by the way I did want to

202
00:12:21,860 --> 00:12:26,680
Speaker 3: mention which I love the displays a lot of times I have my fruit jam just running the background while

203
00:12:26,740 --> 00:12:31,080
Speaker 3: I'm working and just running through all those screensavers sometimes random mode and stuff like

204
00:12:31,120 --> 00:12:36,880
Speaker 3: that if you're interested in any of these projects which I know a lot of these resources

205
00:12:36,900 --> 00:12:42,060
Speaker 3: sources come bundled in with Fruit Jam OS, but I do have another application that I know Tim

206
00:12:42,060 --> 00:12:48,000
Speaker 3: and I have been talking about, the library, Fruit Jam library application, which gives you an

207
00:12:48,120 --> 00:12:52,260
Speaker 3: opportunity, because the Fruit Jam, one of the cool things about it is that it has all the bells

208
00:12:52,260 --> 00:12:57,980
Speaker 3: and whistles in it, right? You have Wi-Fi, you have audio, you have HDMI, you have USB host,

209
00:12:58,540 --> 00:13:06,080
Speaker 3: etc. It's its own little computer, right? Neopixel even and GPIO expansion. So that Wi-Fi adds a whole

210
00:13:06,060 --> 00:13:11,080
Speaker 3: new capacity. Well, now you can basically run things on the device itself and get information

211
00:13:11,340 --> 00:13:15,740
Speaker 3: from the web, et cetera, as long as you're connected to Wi-Fi. And so I've been developing this

212
00:13:16,350 --> 00:13:21,320
Speaker 3: library application to make it so that you can download kind of third-party applications,

213
00:13:21,520 --> 00:13:25,860
Speaker 3: maybe outside of the Adafruit space, or maybe in the future, Adafruit would want to host

214
00:13:25,920 --> 00:13:30,220
Speaker 3: some of their own applications through that that are maybe a little bit too big to host directly

215
00:13:30,480 --> 00:13:36,000
Speaker 3: on Fruit Jam OS, you know, in that one download. And so you can download this one. And so you can download

216
00:13:36,060 --> 00:13:40,300
Speaker 3: application, which will allow you to download all the applications, right? It's the idea, right?

217
00:13:40,460 --> 00:13:47,260
Speaker 3: So I know Dan's, a lot of his projects, Z-machine, Moon Miner, right? And those screenshots,

218
00:13:47,440 --> 00:13:52,560
Speaker 3: it actually supports screensavers as well, are all downloadable through there. And eventually,

219
00:13:53,020 --> 00:13:59,160
Speaker 3: I know Tim, we plan on integrating that into the core OS. We're not there yet. Just it's more

220
00:13:59,220 --> 00:14:05,980
Speaker 4: on my plate than anything. But, you know, those are future plans there. Yeah. I think it's great.

221
00:14:06,000 --> 00:14:12,480
Speaker 4: It's a wonderful idea, and I hope you get that out there and incorporate it in a fruit jam.

222
00:14:12,550 --> 00:14:13,320
Speaker 4: I think it's great.

223
00:14:14,060 --> 00:14:19,840
Speaker 4: I think of it more as an app store than a library because you can go and pick and choose what you want to download.

224
00:14:21,140 --> 00:14:21,880
Speaker 3: So it's great.

225
00:14:22,580 --> 00:14:26,420
Speaker 3: It basically is, I don't think we'd want to use the term store per se.

226
00:14:27,880 --> 00:14:29,060
Speaker 3: There's no cash transactions.

227
00:14:30,740 --> 00:14:30,920
Speaker 3: Yeah.

228
00:14:31,200 --> 00:14:32,960
Speaker 2: I'm super excited about the library as well.

229
00:14:33,020 --> 00:14:34,660
Speaker 2: I'm glad you brought it up, Cooper.

230
00:14:35,500 --> 00:14:38,780
Speaker 2: And yeah, for folks listening, the goal is we're going to move that into Fruit JamOS.

231
00:14:39,020 --> 00:14:45,940
Speaker 2: So then that will be the library itself will be bundled in and you'll be able to launch it right out of the gate and then download further stuff from there.

232
00:14:46,440 --> 00:14:49,680
Speaker 2: And yeah, I did, I think I suggested to change name.

233
00:14:49,720 --> 00:14:52,100
Speaker 2: And maybe even was App Store originally.

234
00:14:53,160 --> 00:14:56,240
Speaker 2: And I wanted to change it to library for both the reason Cooper mentioned.

235
00:14:57,140 --> 00:15:01,780
Speaker 2: We don't intend to sell anything through there, but also just we don't want to run a foul of Apple necessarily.

236
00:15:02,020 --> 00:15:02,120
Speaker 2: Right.

237
00:15:02,180 --> 00:15:03,500
Speaker 2: They already have App Store lockdown.

238
00:15:03,520 --> 00:15:12,320
Speaker 2: But to your point, Dan, it definitely is like exact same concept of App Store, Google Play Store, exact same idea where you can distribute apps through there.

239
00:15:13,600 --> 00:15:14,100
Speaker 3: I think you're right.

240
00:15:14,180 --> 00:15:15,620
Speaker 3: I think we did change it at one point.

241
00:15:16,020 --> 00:15:16,800
Speaker 3: But I like library.

242
00:15:17,620 --> 00:15:18,600
Speaker 3: It's like you're checking out a book.

243
00:15:19,420 --> 00:15:20,980
Speaker 2: Yeah, I liked library as well.

244
00:15:21,220 --> 00:15:21,300
Speaker 2: Yeah.

245
00:15:21,460 --> 00:15:30,080
Speaker 3: And on top of that, some of the applications, like there's another game that I helped develop with my partner who did all the writing and everything called Speed Dating, right?

246
00:15:30,180 --> 00:15:33,400
Speaker 3: Which is like a dating sim kind of featuring.

247
00:15:33,460 --> 00:15:37,240
Speaker 3: featuring Blinka, well, kind of featuring Blinka and a bunch of other snakes and stuff.

248
00:15:37,880 --> 00:15:41,120
Speaker 3: And that, there's just, there's just too much graphically and audio-wise.

249
00:15:41,280 --> 00:15:43,020
Speaker 3: Some, the audio files are kind of big.

250
00:15:43,680 --> 00:15:47,840
Speaker 3: I don't think it wouldn't necessarily max out the flash memory on the device or anything,

251
00:15:48,160 --> 00:15:52,720
Speaker 3: but it would be significant enough that would be over half of the Fruit JamOS.

252
00:15:52,900 --> 00:15:56,700
Speaker 3: So it's just not a good idea to bundle in with the core download.

253
00:15:57,920 --> 00:16:03,400
Speaker 3: And plus the library, there's still more work to be done, but you can download.

254
00:16:03,440 --> 00:16:06,420
Speaker 3: to either the flash storage directly on the device

255
00:16:06,620 --> 00:16:08,420
Speaker 3: or to an SD card, right?

256
00:16:08,820 --> 00:16:10,540
Speaker 3: So then you kind of remove the limits

257
00:16:11,270 --> 00:16:11,740
Speaker 3: of what, you know,

258
00:16:11,860 --> 00:16:14,100
Speaker 3: the flash storage limits of the device.

259
00:16:15,010 --> 00:16:16,340
Speaker 3: And one of these days,

260
00:16:16,420 --> 00:16:18,080
Speaker 3: I could see somebody starting to dive

261
00:16:18,730 --> 00:16:21,180
Speaker 3: into more intensive graphically applications

262
00:16:21,680 --> 00:16:22,680
Speaker 3: and things like that

263
00:16:22,820 --> 00:16:25,660
Speaker 3: that may exceed the base storage

264
00:16:25,860 --> 00:16:26,740
Speaker 3: of even the fruit jam,

265
00:16:26,840 --> 00:16:29,020
Speaker 3: which I think, was it eight, 16 megabytes?

266
00:16:29,540 --> 00:16:31,700
Speaker 3: I believe it's 16 megs flash, yeah,

267
00:16:31,880 --> 00:16:32,660
Speaker 3: it's quite big.

268
00:16:33,160 --> 00:16:36,920
Speaker 3: It's quite big, but you put in a 4-gigabyte SD card,

269
00:16:37,080 --> 00:16:39,800
Speaker 3: then you have basically infinite storage in a way.

270
00:16:40,200 --> 00:16:42,740
Speaker 2: To your point there, I think the SD card and the Wi-Fi as well,

271
00:16:42,920 --> 00:16:45,220
Speaker 2: the Wi-Fi was mentioned earlier with the weather screensaver.

272
00:16:45,340 --> 00:16:48,300
Speaker 2: I think those two things bring a lot to the table for the Fruit Jam,

273
00:16:48,400 --> 00:16:50,420
Speaker 2: being able to get stuff off of the internet

274
00:16:50,680 --> 00:16:53,580
Speaker 2: and being able to cache media files,

275
00:16:53,760 --> 00:16:55,600
Speaker 2: either downloaded stuff from the internet to cache,

276
00:16:55,780 --> 00:16:59,740
Speaker 2: or like you're saying, apps with pre-built assets or stuff like that,

277
00:17:00,020 --> 00:17:03,100
Speaker 2: those could fit on the SD card and free up a lot of.

278
00:17:03,120 --> 00:17:09,140
Speaker 2: of space and flash. So those are two of my top picks for peripherals on the fruit jam. And the Wi-Fi,

279
00:17:09,560 --> 00:17:15,500
Speaker 2: worth mentioning, the Wi-Fi was a relatively late addition to the Fruit Jam. There were a couple of

280
00:17:15,699 --> 00:17:20,600
Speaker 2: revisions that came out, not publicly, that they were never sold, but there were internal ones we

281
00:17:20,600 --> 00:17:26,079
Speaker 2: were working on where there was no Wi-Fi. There was originally an I-SPI cable connector to be

282
00:17:26,140 --> 00:17:32,600
Speaker 2: able to connect like TFT cables over SPI. And then Lady Ada was playing around with it and decided,

283
00:17:32,800 --> 00:17:35,540
Speaker 2: Wi-Fi would be super cool to have this whole little mini-computer.

284
00:17:36,050 --> 00:17:38,480
Speaker 2: And I definitely think that was the right call in hindsight.

285
00:17:39,040 --> 00:17:40,520
Speaker 2: The Wi-Fi adds a lot to it for sure.

286
00:17:41,180 --> 00:17:41,840
Speaker 3: I think so too.

287
00:17:42,200 --> 00:17:46,260
Speaker 3: I mean, there is GPIO expansion, and I believe there's some I-2C ports and stuff.

288
00:17:46,940 --> 00:17:49,820
Speaker 3: And heck, I think there's a STEMA QT port too.

289
00:17:50,420 --> 00:17:51,120
Speaker 3: Yep, definitely.

290
00:17:51,420 --> 00:17:57,000
Speaker 3: So if really having another display on top of the HTML output is necessary,

291
00:17:57,160 --> 00:18:01,040
Speaker 3: I'm sure you could just throw on a little SSD 1306 or something.

292
00:18:02,580 --> 00:18:05,600
Speaker 2: Yep, yeah, we've talked about like shields for the top as well.

293
00:18:05,780 --> 00:18:08,720
Speaker 2: There's two rows, I don't know if it's 20 pins or however many pins,

294
00:18:08,760 --> 00:18:10,520
Speaker 2: but there are two rows of GPIO pins.

295
00:18:11,420 --> 00:18:15,400
Speaker 2: At some point, we may have a little shield or a hat or something that you could stick on the top

296
00:18:15,840 --> 00:18:17,360
Speaker 2: to add TFT screen.

297
00:18:17,540 --> 00:18:23,180
Speaker 2: And I'm hoping for a little sort of game style, like game gear with the screen in the middle

298
00:18:23,340 --> 00:18:25,980
Speaker 2: and then Dpad and A.B button on the right.

299
00:18:26,440 --> 00:18:28,200
Speaker 2: So maybe something like that.

300
00:18:29,300 --> 00:18:31,780
Speaker 2: Do you think there's no battery?

301
00:18:32,420 --> 00:18:34,220
Speaker 3: capabilities on the device, is there?

302
00:18:34,520 --> 00:18:38,140
Speaker 2: That is correct. Yeah, as far as I know, there's no charging.

303
00:18:38,380 --> 00:18:44,580
Speaker 2: So unlike the feathers, which have built-in charging and stuff, there's no JST connector

304
00:18:44,740 --> 00:18:48,160
Speaker 2: for a battery and no built-in charging. So you have to use, like, USB battery or something

305
00:18:48,340 --> 00:18:49,380
Speaker 2: to go mobile with it.

306
00:18:49,880 --> 00:18:54,400
Speaker 3: Yeah, that's a great idea, though. I know one I had, is it would be really, granted, you know,

307
00:18:54,400 --> 00:18:58,600
Speaker 3: you have the USB host support, which is awesome. But it would be really cool to have a little

308
00:18:58,760 --> 00:19:01,480
Speaker 3: hat that sticks on top, and you can plug in SNES controllers.

309
00:19:01,760 --> 00:19:03,260
Speaker 3: or NES or something like that.

310
00:19:03,480 --> 00:19:04,340
Speaker 3: That would be really cool too.

311
00:19:05,180 --> 00:19:07,100
Speaker 3: Maybe not a huge difference over the USB,

312
00:19:07,340 --> 00:19:08,400
Speaker 3: but it would be nice regardless.

313
00:19:09,340 --> 00:19:09,780
Speaker 3: Yeah, definitely.

314
00:19:10,080 --> 00:19:15,020
Speaker 4: It reminds me at the old Atari cartridge location

315
00:19:15,160 --> 00:19:18,880
Speaker 4: where you stick in a cartridge where the ports are.

316
00:19:19,080 --> 00:19:21,780
Speaker 4: So it goes back to the retro styling.

317
00:19:22,620 --> 00:19:23,780
Speaker 3: Definitely, definitely.

318
00:19:24,960 --> 00:19:27,040
Speaker 3: Yeah, and you know, there's a lot of GPIO on there.

319
00:19:27,140 --> 00:19:31,140
Speaker 3: I bet you could almost do kind of a basic cartridge loading.

320
00:19:32,040 --> 00:19:34,560
Speaker 3: thing. We're definitely deep dive in here.

321
00:19:37,120 --> 00:19:40,500
Speaker 3: Just a few address lines, maybe some data lines. I don't know.

322
00:19:41,220 --> 00:19:43,160
Speaker 3: Get an e-prom on there. Who knows?

323
00:19:44,480 --> 00:19:55,440
Speaker 1: Speaking of displays, one of the things that I've seen, and I think other people may have run into as well, is that display out of resolution error that comes up if you don't have the right monitor plugged into a fruit jam.

324
00:19:56,860 --> 00:19:59,960
Speaker 1: As a dev, how do you code for different display sizes?

325
00:20:00,920 --> 00:20:02,940
Speaker 1: on the Fruit Jam in CircuitPython itself.

326
00:20:04,200 --> 00:20:04,980
Speaker 1: Yeah, good question.

327
00:20:05,240 --> 00:20:06,920
Speaker 2: So it is, it's a little tricky

328
00:20:07,080 --> 00:20:09,420
Speaker 2: because it can't be done,

329
00:20:10,160 --> 00:20:14,080
Speaker 2: or I will say it's not set up to be super automatic.

330
00:20:14,400 --> 00:20:17,100
Speaker 2: So lots of devices, lots of modern devices,

331
00:20:17,260 --> 00:20:18,480
Speaker 2: when you plug them into a screen,

332
00:20:18,620 --> 00:20:20,960
Speaker 2: they'll kind of query the screen to figure out what size it is

333
00:20:21,040 --> 00:20:23,080
Speaker 2: and then select something that they both agree on.

334
00:20:23,600 --> 00:20:25,660
Speaker 2: The Fruit Jam has a few things that make it tricky.

335
00:20:25,820 --> 00:20:29,320
Speaker 2: One is that it's working at relatively small resolutions

336
00:20:29,340 --> 00:20:35,320
Speaker 2: by today's standards at least, like 640 by 480 or 320 by 240 even, which ends up getting

337
00:20:36,650 --> 00:20:40,980
Speaker 2: doubled anyways. So those are relatively small sizes. There are some screens out there today if you

338
00:20:41,080 --> 00:20:45,420
Speaker 2: just go to the store, your average electronics store today and you buy sort of the cheapest

339
00:20:45,900 --> 00:20:50,980
Speaker 2: monitor that supports HDMI. It may not support some of those smaller ones. It may be only 1920

340
00:20:51,160 --> 00:20:57,740
Speaker 2: by 1080 or 1280p, just modern sizes. And so that's when it will pop up, I think, the error like

341
00:20:57,760 --> 00:21:00,840
Speaker 2: you're talking about where you'll plug it in and it will say, you know, we can't recognize this

342
00:21:01,400 --> 00:21:07,500
Speaker 2: format or something like that. You can actually connect to it through I-2C. So one of the things that

343
00:21:07,700 --> 00:21:13,920
Speaker 2: HDMI does is it has, I think it's called Edid. Edid, E-D-I-D is the acronym. And I'm not 100% sure

344
00:21:14,020 --> 00:21:18,280
Speaker 2: what all is inside of it, but there is a little data channel inside of there. And you can query

345
00:21:18,620 --> 00:21:24,620
Speaker 2: the screen to ask it like what resolutions it supports. And so you could write code that would

346
00:21:24,700 --> 00:21:27,720
Speaker 2: do some of that and try to select one. The deal is that the for

347
00:21:27,740 --> 00:21:30,900
Speaker 2: Jam is, again, it's only doing those smaller screens.

348
00:21:31,910 --> 00:21:36,200
Speaker 2: And so then even if you ask the screen what it supports, it may still not support something that

349
00:21:36,620 --> 00:21:37,940
Speaker 2: works for that smaller size.

350
00:21:38,560 --> 00:21:39,580
Speaker 2: So that's one of the tricky bits.

351
00:21:39,660 --> 00:21:44,220
Speaker 2: And then in terms of like, what is the developer actually, what do you have control over that's

352
00:21:44,340 --> 00:21:44,700
Speaker 2: easy to do?

353
00:21:45,160 --> 00:21:49,220
Speaker 2: It's super easy to change the resolution between the ones that are supported by the fruit jam.

354
00:21:49,340 --> 00:21:51,140
Speaker 2: So there's a few different ways that works.

355
00:21:51,880 --> 00:21:55,320
Speaker 2: One of them is the user gets some level of control inside of settings.

356
00:21:55,640 --> 00:21:56,020
Speaker 2: Toml.

357
00:21:56,420 --> 00:22:06,540
Speaker 2: You can actually set a configuration line where the user can say, you know, I prefer the 360 size screen, or I prefer the 320 by 240, or I prefer the 640 by 480.

358
00:22:06,820 --> 00:22:08,280
Speaker 2: So you can put that in there.

359
00:22:08,560 --> 00:22:12,840
Speaker 2: And then as a developer, when you're working on your app, you can read the setting there.

360
00:22:12,960 --> 00:22:15,960
Speaker 2: And kind of like the ideal thing would be you follow whatever the user wants.

361
00:22:16,100 --> 00:22:25,440
Speaker 2: But maybe if you're making a game or something and you really have to have a specific screen size for your assets, then you can go and sort of just change the configuration on the display.

362
00:22:25,980 --> 00:22:28,400
Speaker 2: And inside of the Fruit Jam library,

363
00:22:28,660 --> 00:22:32,120
Speaker 2: so we have a Fruit Jam library that's just AdaFruit underscore Fruit Jam.

364
00:22:32,600 --> 00:22:36,500
Speaker 2: It's sort of like a Fruit Jam version of the portal-based libraries

365
00:22:36,680 --> 00:22:41,280
Speaker 2: for folks that are familiar with like the Pi Portal and the bunch of the other ones,

366
00:22:41,680 --> 00:22:42,180
Speaker 2: Fun House.

367
00:22:42,340 --> 00:22:43,740
Speaker 2: There's a bunch of them that have those libraries.

368
00:22:43,860 --> 00:22:48,060
Speaker 2: So Fruit Jam Library has a bunch of Fruit Jam hardware-specific stuff in it,

369
00:22:48,160 --> 00:22:52,100
Speaker 2: and one of the things that it provides is a high-level reconfigure display.

370
00:22:52,340 --> 00:22:53,740
Speaker 2: So I forget the exact name of the function,

371
00:22:53,880 --> 00:22:55,260
Speaker 2: but you can call like Configure Display.

372
00:22:55,860 --> 00:22:57,120
Speaker 2: pass it a width and height,

373
00:22:57,300 --> 00:23:00,280
Speaker 2: and that's sort of the one-liner that you need as a developer

374
00:23:00,800 --> 00:23:03,160
Speaker 2: to actually specify the size for your own app,

375
00:23:04,020 --> 00:23:07,120
Speaker 2: is just pop that in and say 320, 240 or whatever size you want.

376
00:23:07,880 --> 00:23:13,240
Speaker 3: And a lot of applications do default to that 320 by 240 game-wise and stuff,

377
00:23:13,280 --> 00:23:17,260
Speaker 3: because that is kind of the easiest to work with in an arcade game format.

378
00:23:18,200 --> 00:23:20,900
Speaker 3: However, it is, you can support all the support.

379
00:23:21,020 --> 00:23:22,820
Speaker 3: There's four different resolutions, I believe,

380
00:23:23,000 --> 00:23:25,360
Speaker 3: that the Fruit Jam really supports within CircuitPy.

381
00:23:25,380 --> 00:23:31,140
Speaker 3: Python. And it is possible to have support for all those. But it can be a challenge. In fact,

382
00:23:31,400 --> 00:23:38,700
Speaker 3: for the Fruit Jam version of Pac-Man that we have, which I believe I worked on with Retired Wizard,

383
00:23:39,100 --> 00:23:44,040
Speaker 3: it took a lot of testing of all those different resolutions and reformatting, especially with that,

384
00:23:44,100 --> 00:23:48,940
Speaker 3: because it's kind of a, was it, Tate style game, you know, with its vertical layout. It was difficult

385
00:23:49,140 --> 00:23:55,340
Speaker 3: to get that to fit exactly right. But with clever use of display IOs, the group's

386
00:23:55,380 --> 00:24:00,840
Speaker 3: scaling property, you can kind of achieve what you need to do. But you do get a little bit of

387
00:24:01,280 --> 00:24:06,200
Speaker 3: a performance hit whenever you're scaling objects just because it has to copy all those buffers

388
00:24:06,360 --> 00:24:11,520
Speaker 1: and stuff. What are some other challenges for developers to look out for when developing for

389
00:24:11,620 --> 00:24:19,440
Speaker 1: the fruit jam? I will take a quick one, which would be USB stuff. I know we talked to a lot about

390
00:24:19,620 --> 00:24:24,840
Speaker 2: USB hosts earlier and where the responsibility lies between CircuitPython core.

391
00:24:25,320 --> 00:24:28,780
Speaker 2: handling the USB versus you as an application developer

392
00:24:29,040 --> 00:24:30,140
Speaker 2: having to handle it in your own app.

393
00:24:30,720 --> 00:24:31,940
Speaker 2: And so I think we mentioned before

394
00:24:32,100 --> 00:24:34,040
Speaker 2: that keyboard is handled by the core.

395
00:24:34,200 --> 00:24:36,200
Speaker 2: So if you just need basic keystrokes,

396
00:24:36,940 --> 00:24:37,760
Speaker 2: you know, you just want to know

397
00:24:37,840 --> 00:24:39,940
Speaker 2: when the user presses on the arrow keys

398
00:24:40,200 --> 00:24:42,100
Speaker 2: or when they type in a message.

399
00:24:42,640 --> 00:24:44,200
Speaker 2: You can do that very easily.

400
00:24:44,540 --> 00:24:45,880
Speaker 2: You actually just see the input

401
00:24:46,020 --> 00:24:47,900
Speaker 2: as though it came in over the serial line

402
00:24:48,610 --> 00:24:50,100
Speaker 2: if you were writing a C-Python code.

403
00:24:50,200 --> 00:24:53,200
Speaker 2: So you can kind of very easily query the keyboard

404
00:24:53,460 --> 00:24:54,220
Speaker 2: to get those keys

405
00:24:54,280 --> 00:24:55,320
Speaker 2: that have been pressed.

406
00:24:56,020 --> 00:24:57,200
Speaker 2: What we don't have in the core

407
00:24:57,320 --> 00:24:59,040
Speaker 2: is we don't have support for mice

408
00:24:59,200 --> 00:25:01,060
Speaker 2: or any other kind of peripherals.

409
00:25:01,120 --> 00:25:02,160
Speaker 2: So if you want to have a mice,

410
00:25:02,360 --> 00:25:04,780
Speaker 2: a mouse, or a game pad in your game,

411
00:25:04,860 --> 00:25:07,640
Speaker 2: you'll have to have code inside of your own code.

412
00:25:07,840 --> 00:25:09,980
Speaker 2: code.py that initializes it and handles it.

413
00:25:10,100 --> 00:25:11,540
Speaker 2: We do have helper libraries and stuff,

414
00:25:11,960 --> 00:25:13,300
Speaker 2: but it's something you've got to put in your code.

415
00:25:14,680 --> 00:25:16,440
Speaker 2: And then your other sort of choice

416
00:25:16,580 --> 00:25:18,640
Speaker 2: is if you need really fine-grained control.

417
00:25:18,900 --> 00:25:20,500
Speaker 2: So it's really easy to find out

418
00:25:21,380 --> 00:25:22,900
Speaker 2: that the arrow key has been pressed

419
00:25:23,020 --> 00:25:24,200
Speaker 2: or that the user typed the word,

420
00:25:24,220 --> 00:25:29,940
Speaker 2: hello. But if you really, you know, if you think about some video games, you want to know up and down,

421
00:25:30,060 --> 00:25:33,920
Speaker 2: right? You want to know, like, when the key is pressed, while it's held down, and then you want

422
00:25:33,940 --> 00:25:38,020
Speaker 2: to know when it's released. For instance, if you want to have a character like run around a world

423
00:25:38,220 --> 00:25:44,580
Speaker 2: using a D-pad, that's kind of how it works, you know, in most games by default. And if you do

424
00:25:44,620 --> 00:25:50,779
Speaker 2: want that control where you need to know the down, the hold, the up, that is a little bit deeper

425
00:25:50,840 --> 00:25:55,500
Speaker 2: of a level. So the way that the keyboard is hooked up by default in CircuitPython, you don't get that

426
00:25:56,080 --> 00:26:01,240
Speaker 2: stuff. But what you can do is sort of, again, sort of reconfigure it. You can have it undo the default

427
00:26:01,440 --> 00:26:07,180
Speaker 2: configuration and you can get lower level control where you actually get sort of raw HID events as needed.

428
00:26:07,300 --> 00:26:12,000
Speaker 2: And you can definitely see, you know, key went down, key has been held down, and then key is released

429
00:26:12,840 --> 00:26:17,500
Speaker 2: finally. So you could do that stuff. So that is one gotcha that I will throw out is depending on how you

430
00:26:17,580 --> 00:26:20,760
Speaker 2: want to do that input. You may need to use that slightly lower.

431
00:26:20,780 --> 00:26:22,900
Speaker 2: level API for the keyboard.

432
00:26:23,880 --> 00:26:28,280
Speaker 3: I've actually debated extending the GamePad Library to include an option.

433
00:26:28,480 --> 00:26:34,180
Speaker 3: It'd have to be a flag you turn on, but to allow it to automatically detach the keyboard

434
00:26:34,380 --> 00:26:37,360
Speaker 3: and use that as a game pad input, quote unquote.

435
00:26:38,260 --> 00:26:38,900
Speaker 3: Yeah, that would be cool.

436
00:26:39,340 --> 00:26:39,920
Speaker 3: It would be cool.

437
00:26:40,120 --> 00:26:41,060
Speaker 3: It just hasn't happened.

438
00:26:41,140 --> 00:26:44,420
Speaker 3: Have you played around with that yet, Tim, in any of your applications?

439
00:26:45,440 --> 00:26:46,340
Speaker 3: The GamePad Library?

440
00:26:46,470 --> 00:26:48,980
Speaker 3: No, no, directly accessing keyboard events.

441
00:26:49,600 --> 00:26:51,240
Speaker 2: Oh, yeah, a little bit.

442
00:26:51,360 --> 00:26:57,620
Speaker 2: Yeah, so I have, I did, I don't think I have done it in any of my games.

443
00:26:57,980 --> 00:27:03,980
Speaker 2: So I did, the main game that I have worked on more recently uses the D-pad.

444
00:27:04,120 --> 00:27:10,040
Speaker 2: Although, you know, I think the Flappy Nyan Cat one, maybe the Flappy Nyan Cat, I think, does actually pull the lower level one.

445
00:27:10,840 --> 00:27:12,860
Speaker 2: No, that's not true, though, because you don't hold the button down.

446
00:27:13,140 --> 00:27:13,920
Speaker 2: I don't think that's true.

447
00:27:14,040 --> 00:27:15,500
Speaker 2: Sorry, yeah, I think I misremembered that part.

448
00:27:16,080 --> 00:27:19,420
Speaker 2: I don't think I have done the lower-level keyboard thing for any of my games,

449
00:27:19,560 --> 00:27:21,300
Speaker 2: but I am familiar with the code for it

450
00:27:21,440 --> 00:27:23,140
Speaker 2: because I did the keyboard guide

451
00:27:23,620 --> 00:27:25,920
Speaker 2: whenever we first launched the fruit jam

452
00:27:26,880 --> 00:27:27,720
Speaker 2: or I should say

453
00:27:27,840 --> 00:27:29,860
Speaker 2: when we eventually launched the Ada box

454
00:27:29,920 --> 00:27:31,320
Speaker 2: the box came with a keyboard,

455
00:27:31,540 --> 00:27:33,460
Speaker 2: it came with a mouse and it came with the keyboard.

456
00:27:34,420 --> 00:27:36,700
Speaker 2: And when we first got the fruit jams in stock in the store,

457
00:27:36,800 --> 00:27:38,700
Speaker 2: we also got some of those other peripherals.

458
00:27:38,820 --> 00:27:40,820
Speaker 2: And so we wrote guides around the mouse and the keyboard

459
00:27:41,360 --> 00:27:43,180
Speaker 2: that have all the different ways you can hook them up.

460
00:27:43,260 --> 00:27:44,840
Speaker 2: So I was familiar with it from that,

461
00:27:45,260 --> 00:27:49,380
Speaker 2: but I don't believe I have actually used it in a game specifically yet.

462
00:27:49,780 --> 00:27:56,280
Speaker 3: Yeah, I myself, I just hadn't hit a point in which I really needed it yet, so I hadn't really worked on it.

463
00:27:57,420 --> 00:28:12,880
Speaker 3: I would like to add to that question, though, you know, CircuitPython, these microcontrollers are super powerful for what they are, but there is a limit to how much of the screen you can draw in one time without, you know, without breaking that 30, you know, hertz cap or whatever.

464
00:28:13,880 --> 00:28:19,380
Speaker 3: And so you kind of have to be careful when you're dealing with more complex scenarios to only update, you know,

465
00:28:19,540 --> 00:28:21,660
Speaker 3: certain parts of the screen at a time.

466
00:28:21,760 --> 00:28:23,080
Speaker 3: And the more that you can limit that,

467
00:28:23,230 --> 00:28:25,280
Speaker 3: the better your game will feel and run.

468
00:28:26,020 --> 00:28:28,300
Speaker 3: That's why puzzle games work really well

469
00:28:28,440 --> 00:28:29,460
Speaker 3: because a lot of times you're only dealing

470
00:28:29,560 --> 00:28:30,640
Speaker 3: one thing at a time.

471
00:28:31,440 --> 00:28:32,080
Speaker 3: So it's not that hard.

472
00:28:32,200 --> 00:28:33,760
Speaker 3: But when getting into action games,

473
00:28:34,380 --> 00:28:35,520
Speaker 3: like if you're doing screens,

474
00:28:35,730 --> 00:28:37,180
Speaker 3: you know, side scrolling and stuff,

475
00:28:37,480 --> 00:28:38,500
Speaker 3: it's probably possible.

476
00:28:39,660 --> 00:28:42,260
Speaker 3: But you'll have some challenges working with that

477
00:28:42,730 --> 00:28:44,280
Speaker 3: to get it to run really smoothly.

478
00:28:44,780 --> 00:28:47,500
Speaker 3: I know I've been able to get some action scenarios working

479
00:28:47,900 --> 00:28:49,360
Speaker 3: in which you're just moving the characters

480
00:28:49,380 --> 00:28:51,020
Speaker 3: around and that works really well.

481
00:28:51,680 --> 00:28:53,360
Speaker 3: Actually, one example, speaking of

482
00:28:53,500 --> 00:28:55,120
Speaker 3: screen savers, I did make one

483
00:28:55,300 --> 00:28:57,380
Speaker 3: screen saver, it's the mystify

484
00:28:57,620 --> 00:28:59,340
Speaker 3: screen saver from like the, I don't know,

485
00:28:59,540 --> 00:29:00,920
Speaker 3: Windows XP days, right?

486
00:29:01,580 --> 00:29:02,860
Speaker 3: Which is a little bit beyond, because I know

487
00:29:03,120 --> 00:29:05,080
Speaker 3: Fruit JamOS comes with a lot of, you know, flying

488
00:29:05,220 --> 00:29:07,300
Speaker 3: toasters and stuff, the more like Macintosh

489
00:29:07,440 --> 00:29:09,200
Speaker 3: classics. And so I wanted to like get

490
00:29:09,260 --> 00:29:10,980
Speaker 3: something from a different era, right?

491
00:29:11,540 --> 00:29:13,200
Speaker 3: Although it was pretty, it was surprisingly

492
00:29:13,400 --> 00:29:14,740
Speaker 3: easy to program with

493
00:29:15,799 --> 00:29:17,360
Speaker 3: vectorio Polygons and stuff like that

494
00:29:17,440 --> 00:29:18,540
Speaker 3: to get that effect.

495
00:29:19,300 --> 00:29:20,500
Speaker 3: it runs kind of slow

496
00:29:21,380 --> 00:29:22,640
Speaker 3: I'm surprising because every

497
00:29:23,060 --> 00:29:24,780
Speaker 3: in order to do the polygons correctly

498
00:29:24,880 --> 00:29:26,580
Speaker 3: and fill that entire screen with your

499
00:29:26,900 --> 00:29:28,500
Speaker 3: I don't know if you all are familiar with that

500
00:29:28,960 --> 00:29:30,460
Speaker 3: that style of screen saver

501
00:29:31,060 --> 00:29:32,660
Speaker 3: but you basically have to redraw the screen

502
00:29:32,760 --> 00:29:34,640
Speaker 3: for every frame so it's kind of

503
00:29:34,740 --> 00:29:36,680
Speaker 3: like maybe three four frames

504
00:29:36,760 --> 00:29:38,580
Speaker 3: per second but it still

505
00:29:38,640 --> 00:29:40,540
Speaker 3: looks cool so I decided to publish it

506
00:29:40,760 --> 00:29:42,580
Speaker 3: regardless but it's something

507
00:29:42,580 --> 00:29:44,580
Speaker 3: to be aware of. Yeah I ran into

508
00:29:44,700 --> 00:29:45,880
Speaker 4: the screen scrolling

509
00:29:46,620 --> 00:29:48,580
Speaker 4: issue with the moon miner

510
00:29:48,580 --> 00:29:55,780
Speaker 4: game. I initially wanted to have a screen scrolling when the ship is moving around the planet.

511
00:29:56,520 --> 00:30:02,940
Speaker 4: And I also wanted a high resolution because I have this heads-up display of these statistics that are running.

512
00:30:04,540 --> 00:30:10,180
Speaker 4: And it's 640 by 480 and sliding screens just did not work out for me.

513
00:30:10,320 --> 00:30:15,480
Speaker 4: So I changed the course and went with paging one page to the other.

514
00:30:15,580 --> 00:30:18,560
Speaker 4: When you get to the right side of the screen, it'll switch to the left side.

515
00:30:18,580 --> 00:30:20,140
Speaker 4: So it worked out.

516
00:30:20,330 --> 00:30:28,640
Speaker 4: But yeah, the higher resolution, you go, the more pixels you got to deal with, the more performance issues that you may run into.

517
00:30:30,240 --> 00:30:32,320
Speaker 3: But, you know, limitations breed creativity.

518
00:30:32,800 --> 00:30:32,900
Speaker 3: Yeah.

519
00:30:33,360 --> 00:30:34,740
Speaker 3: So I think that's a part of the fun.

520
00:30:35,170 --> 00:30:40,760
Speaker 3: If there were no limitation, if it was just a black box, I could just do anything, it wouldn't be as fun.

521
00:30:41,820 --> 00:30:43,880
Speaker 1: Well, that is the fun of working with microcontrollers.

522
00:30:44,260 --> 00:30:47,140
Speaker 1: It's the constraints that you're under and what can you do with so little.

523
00:30:47,680 --> 00:30:48,100
Speaker 1: Exactly.

524
00:30:48,400 --> 00:30:51,500
Speaker 4: And a nice thing about screensavers, you don't have to worry about the keyboard.

525
00:30:52,140 --> 00:30:55,200
Speaker 4: That's all taking care of at the operating system level.

526
00:30:55,300 --> 00:30:57,420
Speaker 4: Somebody touches a key, your program's gone.

527
00:30:57,580 --> 00:30:59,180
Speaker 4: And so it's doing something else.

528
00:31:00,380 --> 00:31:00,620
Speaker 4: Totally.

529
00:31:01,140 --> 00:31:05,180
Speaker 1: What advice would you have for someone interested in creating a gamer application for the fruit jam?

530
00:31:06,080 --> 00:31:09,040
Speaker 4: Well, you'd need to get one for one thing.

531
00:31:09,760 --> 00:31:15,940
Speaker 4: And right now, I'm surprised, like, they're still hard to get after, since August.

532
00:31:16,840 --> 00:31:18,360
Speaker 3: That's not entirely true, though.

533
00:31:18,800 --> 00:31:24,260
Speaker 3: One thing I was doing some work on recently, in order to help iteration of developing this stuff,

534
00:31:24,740 --> 00:31:32,020
Speaker 3: it's actually possible to get some components of a fruit jam application running within Blinka, right,

535
00:31:32,120 --> 00:31:35,280
Speaker 3: using Tim, your PyGame display library.

536
00:31:35,880 --> 00:31:40,920
Speaker 3: You can kind of simulate the environment and, I don't know, work with it that way.

537
00:31:41,260 --> 00:31:45,480
Speaker 3: You still should get a fruit jam, but you can at least get started.

538
00:31:46,580 --> 00:31:52,320
Speaker 2: Yeah, I mean, even generally, that's one of the things that brought me to CircuitPython was that portability.

539
00:31:52,500 --> 00:31:58,300
Speaker 2: Like not everything that works on PC, normal Python works in CircuitPython, but lots of the stuff is familiar.

540
00:31:58,560 --> 00:32:03,680
Speaker 2: So yeah, we have some ways to try to do that development on the PC or on other hardware.

541
00:32:03,840 --> 00:32:09,660
Speaker 2: Like it was thrown out earlier, the Metro, the Metro RP 2350 days before the Fruit Jam was out.

542
00:32:10,020 --> 00:32:15,280
Speaker 2: We had the Metro RP 2350 and you could actually hook up enough hardware to that to where it can,

543
00:32:15,340 --> 00:32:19,920
Speaker 2: basically be a fruit jam. You would need the Wi-Fi and the display,

544
00:32:20,160 --> 00:32:23,280
Speaker 2: HDMI stuff. But there was USB connector, so you could do all of that.

545
00:32:24,200 --> 00:32:28,560
Speaker 2: Back to the question about the advice for making a game, I think one of my big pieces of

546
00:32:28,720 --> 00:32:33,800
Speaker 2: advice is kind of explore the different display API. So we talked a little bit about this,

547
00:32:33,920 --> 00:32:39,340
Speaker 2: about how much your, how many different things on the screen are moving at once. And if you can

548
00:32:39,540 --> 00:32:44,460
Speaker 2: limit it to just one or two things moving, you have a better time. But there's also just

549
00:32:44,720 --> 00:32:46,620
Speaker 2: several different ways you can draw stuff.

550
00:32:46,720 --> 00:32:49,500
Speaker 2: So we talked a little bit about display text earlier for text,

551
00:32:49,980 --> 00:32:51,960
Speaker 2: and we've talked about bitmaps and tile grids and stuff.

552
00:32:52,220 --> 00:32:53,340
Speaker 2: Vector I.O. was mentioned.

553
00:32:53,540 --> 00:32:56,800
Speaker 2: So that's another one of the options if you're doing basic shapes and colors and stuff.

554
00:32:57,320 --> 00:33:01,140
Speaker 2: And then the Bitmap Tools Library is another one that I'll call out that's in the core

555
00:33:01,260 --> 00:33:05,240
Speaker 2: that can do lots of really interesting manipulations with bitmaps.

556
00:33:05,760 --> 00:33:09,980
Speaker 2: Sometimes you might be able to get away with using the Bitmap Tools library

557
00:33:11,340 --> 00:33:14,360
Speaker 2: instead of different sets of sprites or different assets or something.

558
00:33:14,520 --> 00:33:19,580
Speaker 2: like that. That would be my advice is to explore the different ways that there are out there to

559
00:33:19,780 --> 00:33:24,920
Speaker 2: display stuff. We have different ones are better suited for certain things than others. So you might

560
00:33:24,920 --> 00:33:29,680
Speaker 2: have better luck using a different technique for your particular game based on how you want it

561
00:33:29,760 --> 00:33:35,360
Speaker 2: to behave. And those bitmap tools you're talking about. That's like palette swapping and things

562
00:33:35,440 --> 00:33:41,420
Speaker 3: like that, right? It's not quite. No. So bitmap tools, the core module, there's a bunch of functions

563
00:33:41,440 --> 00:33:47,120
Speaker 2: in there, the ones that I use the most, it's like rotozoom is one. So you can take a chunk out of one

564
00:33:47,360 --> 00:33:53,620
Speaker 2: bitmap and paste it into another bitmap either rotated or scaled up or scaled down. And you can

565
00:33:54,010 --> 00:33:58,600
Speaker 2: even do partial scaling with that. So like groups, we mentioned before, groups in display I.O,

566
00:33:58,680 --> 00:34:03,380
Speaker 2: those can be scaled, but only by a full factor, right? You can scale it by two or three or four.

567
00:34:04,160 --> 00:34:09,260
Speaker 2: With bitmapTools.RotoZoom, you can do partial scales as well. So you could zoom something, scale it up

568
00:34:09,240 --> 00:34:12,240
Speaker 2: by one and a half or just by 10% or something like that.

569
00:34:12,820 --> 00:34:15,840
Speaker 2: So there's rotozoom, there's like draw shapes.

570
00:34:16,060 --> 00:34:18,120
Speaker 2: There's a circle one, a rectangle one.

571
00:34:18,580 --> 00:34:19,940
Speaker 2: I believe there's polygon one.

572
00:34:20,760 --> 00:34:23,320
Speaker 2: There are stuff for alpha blending.

573
00:34:23,580 --> 00:34:24,679
Speaker 2: There's stuff for dithering.

574
00:34:25,179 --> 00:34:26,520
Speaker 2: And it's all implemented in C.

575
00:34:26,740 --> 00:34:31,700
Speaker 2: So it's like it can go really fast to do a bunch of manipulation on a bitmap,

576
00:34:31,860 --> 00:34:34,960
Speaker 2: either a whole bitmap or a chunk out of a bitmap.

577
00:34:36,280 --> 00:34:37,540
Speaker 3: Yeah, it'd be awesome to see some.

578
00:34:37,840 --> 00:34:38,800
Speaker 3: What was the SNES?

579
00:34:38,980 --> 00:34:39,820
Speaker 3: You see mode seven.

580
00:34:40,159 --> 00:34:41,540
Speaker 3: It'd be awesome to see something like that,

581
00:34:41,659 --> 00:34:43,659
Speaker 3: but that might be outside of the capabilities.

582
00:34:46,580 --> 00:34:50,800
Speaker 3: I mean, I'm sure we can go into a whole discussion on game design.

583
00:34:51,200 --> 00:34:52,399
Speaker 3: Because that's what it comes down to.

584
00:34:52,500 --> 00:34:52,679
Speaker 3: You know,

585
00:34:52,780 --> 00:34:56,620
Speaker 3: the CircuitPython and the Fruit Jam provides you the platform,

586
00:34:56,960 --> 00:34:59,560
Speaker 3: but game design is the same across the board,

587
00:34:59,760 --> 00:34:59,980
Speaker 3: you know,

588
00:35:00,100 --> 00:35:02,820
Speaker 3: how you come up with ideas and explore those ideas.

589
00:35:03,420 --> 00:35:06,280
Speaker 3: And, of course, the Fruit Jam is not limited just to games.

590
00:35:07,080 --> 00:35:08,940
Speaker 3: I'd say actually a majority of the application

591
00:35:09,760 --> 00:35:10,820
Speaker 3: are not game related.

592
00:35:11,030 --> 00:35:16,040
Speaker 3: You know, you have, well, Larzio, right, paint music thing, right?

593
00:35:16,680 --> 00:35:17,800
Speaker 3: That's a great application.

594
00:35:17,920 --> 00:35:20,180
Speaker 3: And that's game adjacent, I would say.

595
00:35:20,880 --> 00:35:25,260
Speaker 3: And there's a lot else on the board that, you know, you can make a calculator, you know,

596
00:35:25,500 --> 00:35:26,280
Speaker 3: or the speak and spell.

597
00:35:26,400 --> 00:35:27,540
Speaker 3: I know that was one you did, Tim.

598
00:35:28,360 --> 00:35:28,480
Speaker 3: Yep.

599
00:35:29,020 --> 00:35:30,560
Speaker 3: Speaking spell, IRC.

600
00:35:31,680 --> 00:35:33,020
Speaker 4: I learned by example.

601
00:35:33,590 --> 00:35:38,920
Speaker 4: So I would suggest looking at other CircuitPython projects on GitHub or GitHub or,

602
00:35:39,040 --> 00:35:47,340
Speaker 4: the LEAR, the Adafruit Learn system or the circuit playground group, that's a good resource for

603
00:35:47,580 --> 00:35:53,520
Speaker 4: people that are looking for something similar. John Park's CircuitPython PARSEC, he's had a

604
00:35:53,540 --> 00:35:58,480
Speaker 4: couple games in there. So yeah, there should be resources that I would look at.

605
00:35:59,260 --> 00:36:06,520
Speaker 3: You actually just reminded me, Dan, I did create a Pong game, super basic for the Fruit Jam,

606
00:36:06,980 --> 00:36:14,400
Speaker 3: with a included tutorial that goes through everything from the bootstrap to manipulating graphics and controls and USB input.

607
00:36:14,740 --> 00:36:19,740
Speaker 3: And that would be a great place to start too, especially if you're not familiar with CircuitPython and how that works.

608
00:36:20,640 --> 00:36:22,760
Speaker 3: Because it's about as basic as you can get.

609
00:36:23,720 --> 00:36:26,280
Speaker 1: Is that available as a learn guide or where can people find that?

610
00:36:26,860 --> 00:36:30,540
Speaker 3: So it is on GitHub and it has a GitHub pages thing.

611
00:36:30,660 --> 00:36:34,900
Speaker 3: So it's like a website kind of thing that you go through each section of the tutorial.

612
00:36:34,900 --> 00:36:40,360
Speaker 3: I think I kind of got inspired by Todd Bot's synth I.O. tutorials to do that one.

613
00:36:41,220 --> 00:36:44,580
Speaker 3: I'll make sure to share a link with you, Paul, in case you aren't familiar with that.

614
00:36:44,920 --> 00:36:47,440
Speaker 1: Yeah, I'll make sure that I added to the show notes. That'll be great.

615
00:36:48,340 --> 00:36:52,780
Speaker 1: Well, that's all excellent advice. I'd like to thank all of you for your time this evening.

616
00:36:53,400 --> 00:36:55,580
Speaker 1: Dan, Tim, and Cooper. Thanks so much for coming on the show.

617
00:36:56,080 --> 00:36:56,840
Speaker 1: Yeah, thanks for having me, Paul.

618
00:36:57,260 --> 00:36:57,960
Speaker 1: Thank you for having us.

619
00:36:58,640 --> 00:37:00,060
Speaker 1: It has been a pleasure, as always.

620
00:37:01,080 --> 00:37:02,960
Speaker 1: Thank you for listening to The CircuitPython Show.

621
00:37:03,600 --> 00:37:05,720
Speaker 1: Thank you to Cooper, Dan, and Tim for joining the show

622
00:37:05,960 --> 00:37:08,460
Speaker 1: and sharing their experiences developing for the Fruit Jam.

623
00:37:09,040 --> 00:37:11,380
Speaker 1: To learn more about the Fruit Jam apps the panel has discussed,

624
00:37:11,660 --> 00:37:15,500
Speaker 5: visit the show notes and transcript at www.com.

625
00:37:16,360 --> 00:37:18,120
Speaker 5: Until next time, stay positive.

